Strange behavior of SAMA5D3 on custom board
Posted: Mon Sep 12, 2016 12:41 am
Hi Forum,
I have a fairly minimal custom board with SAMA5D36.
I'm using the IAR IDE via JTAG to test the new board (as bare metal) and get things running (operating from internal SRAM).
I'm using the Debug serial port to monitor activity; at power up I get "RomBOOT", then I send "#" to allow the JTAG to work and then I can run the debugger on IAR.
I have the tested some basic functions such as controlling PIO's - these work OK. I can step through code and view registers and memory etc, and run code that flashes LED's.
The strange behavior includes:
1) I cannot send data over the Debug serial port with "printf". I get chars coming into my terminal, but they are always 0x00. While I can change the baud rate via the usart register (using JTAG / IAR), if I try to change the TX holding register value, it always reverts to 0x000. The same behavior occurs on USART3. I know the Debug serial port can work, because it provides the data string "RomBOOT" at startup when the first level bootmonitor runs, and I can input "V#" and get the RomBOOT version (2.1).
2) I implemented an ISR using the PIT. If I poll for the timeout it clearly works, but does not generate an interrupt. The same code works OK on the ATSAMA5D3 Xplained board.
I have used the ATSAMA5D3 Xplained board a lot and do not see this behavior. I'm thinking perhaps I have missed something and operating JTAG after the RomBOOT might be leaving the ATSAMA5D3 in a strange state that needs to be changed.
I'm using a ATSAMA536 engineering sample from ATMEL - I'm pretty sure these should work just like a chip brought through a place like Digikey...?
Anyway, it's pretty strange...
Comments and suggestions or similar experiences are welcome.
Thanks,
I have a fairly minimal custom board with SAMA5D36.
I'm using the IAR IDE via JTAG to test the new board (as bare metal) and get things running (operating from internal SRAM).
I'm using the Debug serial port to monitor activity; at power up I get "RomBOOT", then I send "#" to allow the JTAG to work and then I can run the debugger on IAR.
I have the tested some basic functions such as controlling PIO's - these work OK. I can step through code and view registers and memory etc, and run code that flashes LED's.
The strange behavior includes:
1) I cannot send data over the Debug serial port with "printf". I get chars coming into my terminal, but they are always 0x00. While I can change the baud rate via the usart register (using JTAG / IAR), if I try to change the TX holding register value, it always reverts to 0x000. The same behavior occurs on USART3. I know the Debug serial port can work, because it provides the data string "RomBOOT" at startup when the first level bootmonitor runs, and I can input "V#" and get the RomBOOT version (2.1).
2) I implemented an ISR using the PIT. If I poll for the timeout it clearly works, but does not generate an interrupt. The same code works OK on the ATSAMA5D3 Xplained board.
I have used the ATSAMA5D3 Xplained board a lot and do not see this behavior. I'm thinking perhaps I have missed something and operating JTAG after the RomBOOT might be leaving the ATSAMA5D3 in a strange state that needs to be changed.
I'm using a ATSAMA536 engineering sample from ATMEL - I'm pretty sure these should work just like a chip brought through a place like Digikey...?
Anyway, it's pretty strange...
Comments and suggestions or similar experiences are welcome.
Thanks,