Problem flashing LoRa Wio E5 mini board through Cube programmer - ARM Trustzone issue

Hi there,
So I have seen this before, One of the reasons I don’t like the STM32cube. anyway the AI say’s this also:
The error message you’re encountering—“Error: Cannot connect to access port 1! If you are trying to connect to a device with TrustZone enabled please try to connect with HotPlug mode.”—is commonly associated with connection issues between the programmer and the target device(check with meter) :+1:, in this case, the LoRa-E5 mini board. This can occur due to several reasons, including improper connection sequences, security configurations like TrustZone, or hardware-related issues.

Potential Solutions:

  1. Utilize HotPlug Mode:
  • In STM32CubeProgrammer, HotPlug mode allows the programmer to connect to the target device without resetting it, which is particularly useful if the device has security features like TrustZone enabled.
  • Steps to Use HotPlug Mode:
    • Open STM32CubeProgrammer.
    • Navigate to the “Settings” or “Connection Setup” section.
    • Enable “HotPlug” mode.
    • Attempt to connect to your device.
  • This approach has been recommended in similar scenarios where TrustZone is enabled.

community.st.com
2. Check Hardware Connections:

  • Reset Pin (NRST):
    • Ensure that the NRST (reset) pin is properly connected between the programmer and the target device.
    • A missing or improperly connected NRST pin can prevent successful communication.

reddit.com

  • Pull-Up Resistors:
    • Verify that appropriate pull-up resistors are in place for the SWDIO and NRST lines, as required.
  • Cable Integrity:
    • Inspect all cables and connectors for damage or loose connections.
    • Using shorter, high-quality cables can reduce signal degradation.
  1. Device Security Configuration:
  • Readout Protection (RDP):
    • If the device’s RDP level is set to 1 or higher, it can restrict debugging access.
    • In such cases, connecting in HotPlug mode is advisable to maintain the user application execution during connection.

st.com

  • TrustZone Settings:
    • If TrustZone is enabled, ensure that the debugger is configured to handle TrustZone-specific settings.
  1. Programmer Firmware and Drivers:
  • Firmware Updates:
    • Ensure that your STM32 Nucleo board’s ST-LINK firmware is up-to-date.
  • Driver Installation:
    • Verify that the necessary drivers for STM32CubeProgrammer are correctly installed on your computer.
  1. Alternative Connection Strategies:
  • Connect Under Reset:
    • Configure the programmer to connect under reset, which can be effective if the device is in a low-power mode or if the application is interfering with the debugger.
  • Boot Configuration:
    • Set the device to boot into system memory to ensure the application doesn’t hinder the connection process.

If these steps do not resolve the issue come back let us know.

HTH
GL :slight_smile: PJ :v: