DA16600 - SPI AT command response error

I am running AT-Commands over SPI on the DA16600 module. Some of the AT-Commands don't work.

AT+WFMODE=0, AT+WFSTA, AT+WFSCAN and other network related commands do not work.

I am sending;

AT+VER, AT+TMRFNOINIT=0, AT+WFSCAN, AT+WFMODE=0 and, AT+WFSTA [in order]. I have enabled 'DEBUG_ATCMD' from the SDK and this is the output I see,

There is no AT-Command executed after AT+TMRFNOINIT=0.

For AT+TMRFNOINIT=0 and rest, the response from buffer is overlapping the header message sent by the main MCU [refer the logic analyzer output].

What is going on here? how to fix this?

I have attached the logic analyzer file containing SPI signals for each command. [they are shown in order]

spi at command signal output.zip

Note: The modifications to the SDK are as per the documentations. 

Parents Reply Children
  • Hi Synd223,

    Apologies for the delay.
    We have confirmed that options 1 and 2 can be used with some modifications to the SDK. These depend on the performance of the MCU, so you should choose the best way after verification.
    Regarding Option 1:
    To increase the pulse width of the SPI interrupt the following change is required. With this change the pulse width will be 135us which is the maximum:

    void host_spi_slave_init(void)
    {
    ...
       // Pulse duration:0x3F(135us), Edge mode:0x01, Active high:0x01	
       DA16X_DIOCFG->EXT_INTB_CTRL =  0xFF;
    ...
    }

    To increase the pulse width to a longer value, change the interrupt mode to level mode and then control the interrupt manually through the following changes:
    void host_spi_slave_init(void)
    {
    ...
        // Level mode:0x00, Active high:0x01 
        DA16X_DIOCFG->EXT_INTB_CTRL = 0x01;
    ...
    }
    
    {
    ...
        DA16X_DIOCFG->EXT_INTB_SET = 0x1; // Trigger Host Int (GPIO    )
        // Level mode
        if ((DA16X_DIOCFG->EXT_INTB_CTRL & 0x10) == 0) {
            SYSUSLEEP(1000);    // 1ms
            DA16X_DIOCFG->EXT_INTB_SET = 0x0;
        }
    ...
    }

    Regarding Option 2:
    Note that the default function of the RTC_GPO is flash control. So the pins will be high at boot-up.
    To change the SPI interrupt to RTC_GPO, the following modifications are required:

    int config_pin_mux(void)
    {
    ...
        RTC_GPO_OUT_INIT(1); // 0: auto, 1: manual
        RTC_GPO_OUT_CONTROL(0);
    } 

    Replace the line DA16X_DIOCFG->EXT_INTB_SET=0x1; with the following code:
        RTC_GPO_OUT_INIT(1); // 0: auto, 1: manual
        RTC_GPO_OUT_CONTROL(1);
        SYSUSLEEP(1000);    // 1ms
        RTC_GPO_OUT_CONTROL(0); 

    To help you out, I have attached the modifications that we have tried and tested.
    spi_interrupt_alternatives.zip

    TO test the case option 1, you can choose the interrupt with the following macro:

    #define CFG_CUSTOM_HOST_INTERRIPT_MODE          (1)	// 0: Level mode, 1: Edge mode 
    

    And to test the case option 2, you can choose using the RTC_GPO as the host interrupt pin.
    #define CFG_USE_RTC_GPO_AS_HOST_INT             (1)	// Using RTC_GPO as the host interrupt pin 
    

    Please let us know if you have any problems.

    Best Regards,
    OV_Renesas