Showing posts with label UART. Show all posts
Showing posts with label UART. Show all posts

Wednesday, September 16, 2015

UART Driver Improved But Still Slow

I did a lot of scoping of the UART driver. And while I got some minor improvements by hand optimizing some slow parts, the driver is still not super swift. I still have a few questions, about some things, but I also added a tweak--I made it possible to suppress echo on gets. Now when the intel hex file goes across, instead of echoing it back, I just output a '.' to show that something was programmed. This makes the process fairly quick. I still need a to improve the speed of the flash activation.

Also, I have been using the native facilities to program the flash. I no longer use the Arduino. The wires between Arduino and the board are soldered into the board, but I have plans for that. But for now, the Arduino is docked to the side of my board. The computer runs with it not powered up.

Tuesday, September 15, 2015

Bank Switch Works But UART Driver Has An Issue

I got the bank switch stuff working. The interrupt.c wasn't hooking up to the membank.c ISR. So it was naturally doing the bankSwitch, but not the bankSwitchAndJump. Once it was properly hooked up, it started working. Now I can load an image into a flash bank and jump to it. That will be useful.

I also am puzzled that my communication seems so slow. Indeed, when the UART starts to send, it takes 3.2ms before it starts to send the next byte. The interrupt is asserted almost immediately after the send and it is quickly managed. So, somehow, I'm losing the interrupt on transmit buffer empty without filling it and then filling it at some later time...?

Anyway, I'm now bringing all my powers of deduction on that problem. I'm also thinking of not echoing gets for intel hex programming. I already have a 3 extension function for limiting the buffer size. Limiting echo is just one more such function. Combined with an assembly flash activation function call, this should make flash programming much quicker.....

Well, off to solve my problems...