We are using a custom board design. I created a custom board configuration when using the v2.5 SDK. In this configuration, we have the UART0 pins configured such that RXD is configured to use GPIO P0.09 and TXD is configured to use GPIO P0.10.
When I build the code that is designed to work with the Nordic SDK v2.5.2, the code builds and when downloaded to our custom board, the UART functions properly (both transmit and receive working as expected). However, when I build the code that was modified to work with Nordic SDK v2.6.2, the UART (UART0) does not work. In the debugger, I see that the UART ERRORSRC (register at 0x40002480) has a value of 0x0000000C. From the product specification, this indicates a framing error and break condition. Reading the description of the Break condition, it would seem that the RXD input is being held low.
We have build code that works with SDK v2.7.0 and v2.8.0 and both of these versions exhibit the same failure as the v2.6.2 SDK code.
The interesting behavior occurs when I do the following:
1). I build the v2.5.2 SDK code and flash it to our custom board using the "Erase and Flash to Board" programming function. This code has proper UART0 functionality.
2). I then build the v2.6.2 SDK code (or the v2.8.0 SDK code for that matter) and then flash it to our custom board using the "Flash to Board" programming function. When booting this configuration, the UART0 functions properly as well. There are no errors reported in the UART's ERRORSRC register.
3). I if take the v2.6.2 (or the v2.8.0) SDK code then flash it to our custom board using the "Erase and Flash to Board" programming function, then the UART0 does not work properly -- due to the framing and break error conditions.
What sections of flash are programmed with the "Erase and Flash to Board" function that are not programmed with the "Flash to Board" function that could account for this difference? How can we configure our product so that UART0 will work without having to program older code first (step 1 above)?
I have tried the AI search suggestion of adding these two lines to the prj.conf with no effect:
CONFIG_TFM_SECURE_UART=n
CONFIG_TFM_LOG_LEVEL_SILENCE=y
I have also tried modifying the device tree configuration on v2.6.2 so the resulting zephyr.dts file matches (as closely as I can possibly get it) the v2.5.2 zephyr.dts file.
I have looked at all the PSEL register values to make sure that no other configuration was also selecting the P0.09 or P0.10 GPIO.
Any thoughts on what could be going on here?
Thanks,
Gene Roylance
PuzL Labs