ARMmbed / mbed-os-example-lorawan

Simple LoRaWAN example application for mbed OS
Apache License 2.0
78 stars 92 forks source link

HardFault STM32L433RC + SX1272 #215

Closed Kormoran86 closed 1 year ago

Kormoran86 commented 3 years ago

Description of defect

Hello,

I'm using a NUCLEO-L433RC-P + SX1272MB2xAS with the lorawan example code, after uploading the code to the board I get the following hard fault message:

++ MbedOS Fault Handler ++

FaultType: HardFault

Context: R 0: 00000000 R 1: 20010000 R 2: 00000001 R 3: 20010000 R 4: 20003314 R 5: 20004170 R 6: 20000CB4 R 7: 20000610 R 8: 00000000 R 9: 00000000 R 10: 00000000 R 11: 00000000 R 12: 20010000 SP : 20002318 LR : 080108F5 PC : 08003354 xPSR : 01000000 PSP : 200022B0 MSP : 2000FFD0 CPUID: 410FC241 HFSR : 40000000 MMFSR: 00000082 BFSR : 00000000 UFSR : 00000000 DFSR : 00000008 AFSR : 00000000 MMFAR: 00000000 Mode : Thread Priv : Privileged Stack: PSP

-- MbedOS Fault Handler --

++ MbedOS Error Info ++ Error Status: 0x80FF013D Code: 317 Module: 255 Error Message: Fault exception Location: 0x8003354 Error Value: 0x20002810 Current Thread: main Id: 0x20002BB4 Entry: 0x8012619 StackSize: 0x1000 StackMem: 0x200013C8 SP: 0x20002318 For more info, visit: https://mbed.com/s/error?error=0x80FF013D&tgt=NUCLEO_L433RC_P -- MbedOS Error Info --

The LoRa parameters were configured using the mbed_app.json:

    "main_stack_size":     { "value": 2096 },
    "lora-spi-mosi":       { "value": "PA_7" },
    "lora-spi-miso":       { "value": "PA_6" },
    "lora-spi-sclk":       { "value": "PA_5" },
    "lora-cs":             { "value": "PA_4" },
    "lora-reset":          { "value": "PA_0" },
    "lora-dio0":           { "value": "PA_12" },
    "lora-dio1":           { "value": "PB_3" },
    "lora-dio2":           { "value": "PB_5" },
    "lora-dio3":           { "value": "PA_15" },
    "lora-dio4":           { "value": "NC" },
    "lora-dio5":           { "value": "NC" },
    "lora-rf-switch-ctl1": { "value": "NC" },
    "lora-rf-switch-ctl2": { "value": "NC" },
    "lora-txctl":          { "value": "NC" },
    "lora-rxctl":          { "value": "NC" },
    "lora-ant-switch":     { "value": "NC" },
    "lora-pwr-amp-ctl":    { "value": "NC" },
    "lora-tcxo":           { "value": "NC" }
    },
    "target_overrides": {
        "*": {
            "platform.stdio-convert-newlines": true,
            "platform.stdio-baud-rate": 115200,
            "platform.default-serial-baud-rate": 115200,
            "mbed-trace.enable": true,
            "mbed-trace.max-level": "TRACE_LEVEL_DEBUG",
            "lora.over-the-air-activation": true,
            "lora.duty-cycle-on": true,
            "lora.phy": "US915",
            "lora.fsb-mask" : "{0x00FF, 0x0000, 0x0000, 0x0000, 0x0001}",
            "lora.device-eui": "{  }",
            "lora.application-eui": "{  }",
            "lora.application-key": "{  }",
            "target.components_add": ["SX1272"]
        },

I'm using mbed 6.7 and the arm-gcc 10.2.1 toolchain, I also tested with an older version of the example code (mbed-os-5.11.2) compiled with the mbed online compiler (same mbed_app.json) and it works.

Target(s) affected by this defect ?

NUCLEO L433RC-P

Toolchain(s) (name and version) displaying this defect ?

arm-gcc 10.2.1

What version of Mbed-os are you using (tag or sha) ?

mbed-os-6.7.0

What version(s) of tools are you using. List all that apply (E.g. mbed-cli)

mbed-cli, arm-gcc 10.2.1 and Mbed Studio: 1.3.1

How is this defect reproduced ?

Read description.

ciarmcom commented 3 years ago

Thank you for raising this detailed GitHub issue. I am now notifying our internal issue triagers. Internal Jira reference: https://jira.arm.com/browse/IOTOSM-3509

jeromecoutant commented 3 years ago

Few questions: