Hello,
I have a pretty simple question, that I've searched too much to know that it would be easier to just ask here. I want to know if there's any way I can use the Debug Session in my ARM7 program to work in real-time.
My basic situation is this. I have a program, and let's say it is supposed to output something around 300 characters to a UART for every keyboard input into the same UART. I notice that the UART, to me, is taking about 1 second for every 100 characters output, but on the bottom right, for simulation time, it only takes "a quarter of a second" to output all the characters I need.
I want to be able to see all 300 characters output in an actual quarter of a second, in the UART. Is there any way to do this strictly in the software? I imagine there are ways to make this work with hardware, but I wanted to see it in software to impress some friends with what I was able to accomplish.
Thanks, ~Boston
You never mention what processor you have, or show any code.
But select a reasonably fast baudrate, since the baudrate affects how long time it takes for the UART to send out each character and be ready to output the next character.
Then check if your processor supports any feature to allow it to buffer multiple outgoing characters - like if it possibly have a transmit FIFO queue. If it doesn't, then you need to make sure that an interrupt-driven transmit can react quickly by making sure you don't disable interrupts (for example by spending lots of time in other interrupt handlers). Or if you do polled write, then you need to make sure you poll often enough.
Note that the simulator isn't a perfect replication of a real chip. So it might possibly ignore the actual send times caused by the baudrates, and so much quicker signal to the program that the UART is ready for more characters.
In the end, most processors should be able to send out characters virtually directly after each other, in which case it will be the number of bits (start bit+data bits+stop bit(s)) in relation to selected baudrate that will decide exactly how long it takes to send 100 characters.
Oh sorry, thought I posted the processor. It's ARM7-TDMI. I don't have the code with me right now, and it's somewhere around 300 lines so I'll try to pick out the important parts later today.
No, the processor is not ARM7-TDMI. That's just an indication of processor core and doesn't give any indication of what peripherial hardware the specific manufacturer might have glued around the processor core. There are big differences between ARM chips even if they might have the same processor core - ARM7-TDMI doesn't indicate if the UART(s) supports FIFO or DMA transfers.
The relevant information is manufacturer and model of the processor. Like NXP (manufacturer) LPC2366 (model).