dragino / LoRa_STM32

Source code for Dragino LoRa module base on STM32 Chip
76 stars 77 forks source link

AT+INTMOD=x causes WD reset - FIXED #19

Open ehogeweg opened 2 years ago

ehogeweg commented 2 years ago

Hi,

I noticed that I was unable to set the interrupt mode with the AT+INTMOD=x command on devices with FW-1.7.2.

The issue appeared to be in at.c#1359 where the uint8_t caused the misery. Replacing with int appears to fix the issue. Not familiar enough with the environment to find if there is a compiler directive I should have set.

ATEerror_t at_INTMOD_set(const char *param) {
//  uint8_t interrputmode;
    int interrputmode;
    if (tiny_sscanf(param, "%d", &interrputmode) != 1) {
        return AT_PARAM_ERROR;
    }

There are several other commands that have the same issue: CHE, RPL...

Environment: OS: MacOS 11.6.7 IDE: STM32CubeIDE Version: 1.10.0 Toolkit: GNU Tools for STM32 (10.3-2021.10)

Cheers,

Erwin