Rather than simply copy and pasting driver code between software projects, is there a more maintainable/scalable way of reusing drivers?
casuallywill
u/casuallywill
Using the case of an Arm cortex-m 3 stage pipeline of fetch -> decode -> execute, each pipeline stage must take an equal amount of time to complete to gain the full benefit of the pipeline.
How are instructions fetched from slow flash memory in one clock cycle?
By my current understanding I would expect the pipeline to continually stall waiting for an instruction. For example, say an instruction fetch takes 4 clock cycles, therefore the pipeline is never used.
edit: Thanks for the responses, wait states and instruction pre-fetch units increase instruction throughput to make up for the latency issues. Here's a good article from Jack Ganssle on wait states for anyone who is interes
Hi, I'm at the start of my career currently working in a team focusing on board bring up. The team consists of hardware engineers designing PCBs and FPGA designs and I am the sole software engineer.
In terms of software a lot of what I have learnt so far has been through online courses, blogs, material found on r/embedded, training courses and working on existing well written projects. In my work I do not give/receive code reviews and rarely get to discuss software in great detail which I feel this could limit my development.
What would be your advice to make sure I continue to improve my software skills?
Is it possible to exit the hardfault interrupt handler and return back to the main program?
I know it is possible to reset the processor from the hardfault handler but I would prefer this not too happen.
If this is not possible, is it possible to make the processor just ignore invalid memory writes? This is just a test program hence the strange requirements.
I'm currently trying to learn about how different file types are loaded onto microcontrollers.
From what I understand, binary files do not contain address data and therefore cannot contain holes unlike hex files.
Therefore I would expect any binary file produced that places .text in Flash and .data in RAM to cover each memory address with filler data, resulting in huge file sizes.
However, when I use Keil's fromelf program which converts .axf into .bin the .bin file size is in kB. If flash address is 0x0800_0000 and RAM is 0x2000_0000, shouldn't this value be much larger to fill in the space?
I'm currently trying to get an overview of how GDB is able to remotely debug an Arm microcontroller.
From what I understand the following sequence takes place:
GDB client -> OpenOCD server -> JTAG converter -> Debug access port -> Coresight Debug Components (e.g. Breakpoint unit)
The Coresight TRM provides a good overview of how registers are exposed through the DAP - http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0314h/Cihbhhde.html
If a DAPLink is used as the JTAG/SW converter, it provides the CMSIS-DAP commands, a standard interface for accessing the DAP. I can see how this can be used to read the registers of coresight debug components.
I am unsure of h
I'm currently learning about file systems in an embedded context.
Some devices such as MP3 players allow a host PC to access their Flash memory while also reading from the same Flash themselves.
How can two file systems be writing or reading to the same memory at the same time?
Will there not be contention when a read and write is requested for the same block of memory causing a fault or error?
And lastly if it is possible how are they doing it?
Thanks
I decided to make a Stoke City themed circle for the reddit April fools event.
PM me for the key!
Is it possible to set up a serial connection between two microcontrollers via a Serial to USB converter and then a USB to serial converter.
E.g. Microcontroller 1 -> Serial - USB converter -> USB - Serial converter -> microcontroller 2.
Would microcontroller 1 be able to communicate with microcontroller 2 just using a standard Uart driver?
I realise this may seem strange, but due to the constraints of the system the microcontrollers cannot have a straight serial connection.