This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi, every one
I use TM4C123GXL for a flash bootloader demo. I customized the Tivaware bootloader code to use UART1 as the port. My host device is a raspberry pi and I use pyserial(python serial module ) to send the bootloader command packet what I saw in the Tivaware Bootloader User's guide. My question is as below :
At the first, there is only the customized bootloader code locating at 0x0000.I can send ping,get_status,download and send command from the raspberry pi.When I reset TM4C123gxl,it will start from the bootloader and go to the application which will flash the on board for a while and jump to bootloader(via jumpBootloader()).
I add the UARTstdio in the bootloader so I can debug the code from another uart port on my PC.After the jumptToBootloader() happen, I found every command can't get a response. I found it seems like the buffersize is not enough and this caused by a wrong reading of the first byte of the packet.For example, in ping command,the first byte should be 0x03 but the TM4C123GXL read it as 252 which causes the buffer too small.
Does anyone know what may be the cause of the issue??
really appreciate for any help
Yen Hung Liu said:looking at the first RX start of frame from the target device and checking if the bit time is indeed ~8.68us".
If I may - I'm (somewhat) experienced EE - may save (both) you & Amit some time/trouble.
Amit's suggestion requires that you employ an oscilloscope to monitor the serial signal's "timing" and voltage levels when input to your MCU's UART_RX pin.
Bit time is the duration (in µS) of each of the (usual) 10 bits which encompass a serial "byte." You may best measure this timing by sending the unique chars: 0xAA or 0x55. (either cause the bit pattern to consistently alternate - (0-1-0-1 etc.) which eases your measurement as each individual bit clearly transitions.) If you've properly set the baud-rate - each of those bits should measure at/around 8.68µS. Note: neither 0xAA nor 0x55 are "legal" boot-loader commands - they are to be used ONLY for confirming the serial bit-time - per Amit's direction. (after their use - & bit-time measure - remove them)
As you note that you can (now) "Use every command, after gotobootloader()" it appears to me that - if that statement proves correct - your baud rate is NOT the issue. (i.e. if those commands are sent & acted upon properly - your baud rate appears acceptable)
Amit's App Note is highly detailed - really excellent - yet boot-loaders are complex. It usually pays to read that note several times - listing each/every point w/in your chosen boot-load method - and test/verifying (then checking off) each step along the way...