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
  • Hi There,

    Apologies for the delay.
    From the logic trace, we can see that the host is not reading the DA16200's response in time.
    Could you check if you are reading the response as soon as possible after the DA16200's SPI interrupt occrus?

    In the SDK, there is a 200ms timeout for reading the data from the host. If the MCU does not read the response from the DA16200 in time, it will be dropped.

    This is described in section 3.2.2.3 Read Sequence and Structure from the UM-WI-003 DA16200 DA16600 Host Interface and AT Command User Manual (renesas.com)


    Best Regards,
    OV_Renesas

  • Hello,

    Sorry for the delay in my response,

    We have developed a custom board for DA16600, and the SPI interrupt is assigned to a non-IRQ pin on the main MCU, so I cannot use interrupts to detect the signal sent from DA16600. 

    There are three options for me, as I see it;

    1. Increase the pulse-width of SPI-interrupt generated from DA16600 as I am using a while loop to continuously read the pin and detect a change in level.

    2. Change the SPI-interrupt to another pin on DA16600. [here, I am able to change the SPI-interrupt to another GPIO from SDK, but as per our hardware design I can only swap the functionalities of SPI-interrupt with RTC_GPO to fit our MCU, please give me a direction on how to do this!]

    3. Add interrupt functionality to a non-IRQ pin on main MCU [S7G2 in our case], which I know is not a good option.

    What do you suggest I do? if you have any better insights, please share!

    Thank you.

  • Hi There,

    Thank you for the reply.
    Let me check on this with the Wi-Fi team and I will get back to you as soon as possible.

    Best Regards,
    OV_Renesas

Reply Children
  • Hello,

    Any updates on the above issue? did you find a suitable solution?

    Best Regards,

    synd223

  • Hi Synd223.

    Apologies for the delay.
    I do not have any update yet. I will try to update you tomorrow.

    Best Regards,
    OV_Renesas

  • 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