Seeed-Studio / LoRaWan-E5-Node

Applications on LoRa-E5 mini/ LoRa-E5 Development Kit with v1.1.0 STM32Cube MCU Package for STM32WL series(SDK)
56 stars 26 forks source link

Simple LED blink on lora-e5 mini #9

Open kargarisaac opened 2 years ago

kargarisaac commented 2 years ago

Hello,

I'm trying to use this repo to program a new lora-e5 mini board that I got recently, but cannot program the board. So, I decided to just test a simple LED blink test. Again, I cannot do it and get the same error. This is the error I get:

STMicroelectronics ST-LINK GDB server. Version 6.1.0
Copyright (c) 2022, STMicroelectronics. All rights reserved.

Starting server with the following options:
        Persistent Mode            : Disabled
        Logging Level              : 1
        Listen Port Number         : 61234
        Status Refresh Delay       : 15s
        Verbose Mode               : Disabled
        SWD Debug                  : Enabled
        InitWhile                  : Enabled

Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
Failed to read registers from target
Shutting down...
Exit.

I create a new empty project and set portB pin5 on and off as follows:

while (1)
  {
      HAL_GPIO_WritePin(GPIOB, GPIO_PIN_5, GPIO_PIN_SET);
      HAL_Delay(1000);
      HAL_GPIO_WritePin(GPIOB, GPIO_PIN_5, GPIO_PIN_RESET);
      HAL_Delay(1000);
    /* USER CODE END WHILE */

    /* USER CODE BEGIN 3 */
  }
  /* USER CODE END 3 */

Any idea?

I also tried to use stm32cubeProgrammer but it didn't help:

  22:33:11 : Memory Programming ...
  22:33:11 : Opening and parsing file: loraE5Mini_blink.elf
  22:33:11 :   File          : loraE5Mini_blink.elf
  22:33:11 :   Size          : 6.20 KB 
  22:33:11 :   Address       : 0x08000000 
  22:33:11 : Erasing memory corresponding to segment 0:
  22:33:11 : Erasing internal memory sectors [0 3]
  22:33:11 : Download in Progress:
  22:33:11 : Error: failed to download Segment[0]
  22:33:11 : Error: failed to download the File
  22:33:11 : RUNNING Program ... 
  22:33:11 :   Address:      : 0x08000000
  22:33:11 : Warning: The core is locked up
  22:33:11 : Start operation achieved successfully
lakshanthad commented 2 years ago

Hello @kargarisaac,

Have you set the "Read Out Protection" to AA inside STM32CubeProgrammer as mentioned in the README?

Best Regards, Lakshantha

kargarisaac commented 2 years ago

I try to do it but it doesn't work always. It gives me the following error. I could do it once, but again it didn't work either.

image

I also see the "unlock chip" and when I try it, I get the following error:

image

Any idea? I'm trying to solve this for more than a week but no result yet. Any help would be appreciated.

Thanks

johflo commented 2 years ago

Hi,

Change RDP to AA and press Apply. This works for me.

Best Regards, Johannes