This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AWR1243BOOST: implementing interrupt handler for AWR1234BOOST with MSP430F5529 MCU

Part Number: AWR1243BOOST
Other Parts Discussed in Thread: MSP430F5529, , AWR1243

Hi TI team,

For some time we tried to port the mmw_dfp_example to the MSP430F5529 MCU. We implemented all the new callbacks except the ones responsible for the interrupt handling:

clientCtx.devCtrlCb.rlRegisterInterruptHandler = rlsRegisterInterruptHandler;

clientCtx.devCtrlCb.rlDeviceWaitIrqStatus = rlsDeviceWaitIrqStatus; 

we have some questions regarding this two callbacks

1. We read how interrupts work on MSP430 MCU but are confused between different way of explaining how interrupts works. when talking about interrupts on MSP430 MCU is often referenced an interrupt service routine or ISR. is this the same thing as the interrupt event handler when talking about AWR1243BOOST?

2. If the previous statement is true should the ISR be implemented inside the rlsRegisterInterruptHandler or rlsDeviceWaitIrqStatus? or should be in the callback rlsRegisterInterruptHandler just enable the GPIO interrupt?

3. Which function should the ISR call when the interrupt happens?

4. Is the tought process that we are having right or are those callbacks something different in reality?

Thank you for the answers.

Best regards,

Tadej Krmac

  • Hi Tadej,

    FTDI library which is being used in DFP example, code of that is available in mwmave studio installation.

    Please refer FTDI library for the implementation of rlsDeviceWaitIrqStatus and rlsRegisterInterruptHandler at this location

    C:\ti\mmwave_studio_02_01_00_00\mmWaveStudio\ReferenceCode\FTDILib\SourceCode\mmwl_port_ftdi.c  (within mmwave Studio installation).

    This would give you some insight how to implement these callbacks.

    And you can refer some old thread on similar topic

    https://e2e.ti.com/support/sensors/f/1023/t/856058 (question 1)

     

    Regards,

    Jitendra 

  • Hi Jitendra,

    we already referenced the FTDI library for our code implementation, but encountered problems afterwards. We are stuck in the rlAppSleep function and cannot get out. That is why we asked again if we did something wrong with the callbacks implementation for the interrupts. Or maybe there is a problem somewhere else we cannot see.?

    For the hardware connection we are using the connection suggested in the following thread:

    e2e.ti.com/.../839686

    Can you suggest us which part of the code to check or the hardware connection to find the problem?

    Best regards,

    Tadej Krmac

  • Hello Tadej,

    mmwavelink listens any HostIRQ interrupt from function pointer which is being registed by rlsRegisterInterruptHandler callback

    As per Host IRQ interrupt handler setup in other e2e thread--

    RL_P_EVENT_HANDLER g_RlInterruptFunc;

    char gDeviceIndex = 0;

    rlInt32_t app_RegisterInterruptHandler(rlUInt8_t deviceIndex, RL_P_EVENT_HANDLER pHandler, void* pValue)

    {

       g_RlInterruptFunc = pHandler;

       return 0;

    }

    /* GPIO interrupt handler for HotINT*/

    void gpioIsr(gioPORT_t *port, uint32 bit)

    {

                 g_RlInterruptFunc(0, &gDeviceIndex);

    }

    Make sure that you have implemented callbacks as mentioned in the e2e thread.

    Now you need to check GPIO ISR is getting called as soon as AWR device is up. AWR12/22xx device raise HostIRQ high as soon as it is powered up, so if GPIO interrupt is setup correctly in SW & HW, above gpioisr() function should get called. And from there it calls mmwavelink pHandler function.

     In the application (like DFP: mmwavelink_example) post rlDevicePowerOn function call it waits for poweron async-event which mmwavelink read based on HostIRQ interrupt only.

    Now at the Hardware end you can probe on AWR1243 device end for the same HostIRQ pin signal status to confirm if HostIRQ signal is high or now.

     

    Regards,

    Jitendra

  • Hello,

    thanks to your help we came a little further with our implementation. We managed to implement the SPI and the interrupt handler almost successful and the HostIRQ signal successfully goes low. But unfortunately now we have some other errors.

    After some debug we found that the error is called RL_RET_CODE_MSGID_MISMATCHED. We also checked that the SPI should work fine because we are reading the correct SYNC pattern (0xDCBA, 0xABCD)

    Can you also help with this problem or at least tell us where to look for errors in our code?

    Should i open another thread for this issue?

    Best regards,

    Tadej Krmac

  • Hello Tadej,

    I'm glad that you made process on your development. 

    It would be nice if you create a new thread for a different type of issue.

    Now for your callback implementation make sure that mutex and semaphore callbacks are correctly implemented.

    If mutex or semaphore doesn't work as expected then you may see unexpected result from mmwavelink.

    And make sure that you invoke one command at time, invoke next command only after first mmwavelink API returns.

    RL_RET_CODE_MSGID_MISMATCHED error may possible if it tries to compare last reponse with current command's msgID or vice versa. For this you first need to verify mutex & semaphore implementations.

    Regards,

    Jitendra

  • Hi,

    thank you for the response. Will try to check the semaphore and mutex implementation. (for now we used rl_nonos.c for that). If the problem persist I will open a new thread.

    best regards,

    Tadej Krmac

  • Hello Tadej,

    If you using rl_nonos.c from DFP then it should work without any problem.

    Make sure that you have implemented correctly in your application as per mmwavelink_example (from DFP).

     

    Regards,

    Jitendra