BergPropulsion / linux-imx

Fork of linux-imx with some specific BSP patches. Codeaurora is now sunset, so the 'original' is now here: https://github.com/nxp-imx/linux-imx
Other
0 stars 1 forks source link

Diagnose SysA bootloader problem on EK855 #3

Open AnasAtBerg opened 2 months ago

AnasAtBerg commented 2 months ago

Description

We can't connect to the bootloader on SysA after flashing the SW. Tested without the Avnet SoC mounted and we connected successfully. We suspect that the Avnet board is pulling the RTS pin low (low = ready to send) on SER2 and that interrupts the connection to uC on SysA.

AnasAtBerg commented 2 months ago

SER2 corresponds to UART3 in the DTS. UART3 is currently configured with RTS & CTS in msc-sm2s-imx8mp-module.dtsi.

However, EK855 only connects the RTS pin (CTS not connected).

According to device tree docs:

I suspect the fact that we have CTS configured even though it's not connected may be causing undefined behaviour on the connected RS485 line.

Deployed new device trees on USB stick without CTS configuration (only RTS). Will test it on target HW on Thursday (2/5).

AnasAtBerg commented 2 months ago

Blocker: need to be at the office to run a test and decide whether the fix is sufficient.

If yes, apply and commit the fix - then move to done. If no, move back to in-progress.

AnasAtBerg commented 2 months ago

Fix didn't work - back in progress.

AnasAtBerg commented 2 months ago

The fix didn't work since it was misguided. The problem only happens when booting the SoC, which suggests that the SER2 RTS is being pulled low. Why?

AnasAtBerg commented 2 months ago

Blocked Will be tested with a physical resistor at QR Tech.

AnasAtBerg commented 1 month ago

A 10kOhm PU resistor on RTS# fixes the problem. Avnet specify that a PU resistor is implemented on module for the SoC; however, I believe that means it's SW enabled. Meaning they use the IOMUX to enable the appropriate internal PU resistor. The problem with that is that it happens much later in the process - so we miss our chance to connect the bootloader.

Therefore, adding a physical PU resistor eliminates the problem by ensuring we have it from the get-go.