Skip to content

DIG_process in interrupt #4

Description

@qiayuanl

Your code and documents are awesome! Thank you for your sharing.

Following your SOES_CIA402_AX58100 code, I wrote my code using CubeMX(HAL) and successfully ran it in NUCLEO-F401RE and AX58100-REF-1 without CIA402 applications.

After success, I try to call the DIG_process in the interrupt callback. The code is shown below:

void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) {
 if (GPIO_Pin == ESC_INT_Pin) {
    ESC_updateALevent();
    if (ESCvar.ALevent & ESCREG_ALEVENT_SM2) {
      if (ESCvar.dcsync == 0)  // If DC sync is not active, run the application, all except for the Watchdog
        DIG_process(DIG_PROCESS_OUTPUTS_FLAG | DIG_PROCESS_APP_HOOK_FLAG | DIG_PROCESS_INPUTS_FLAG);
      else  // If DC sync is active, call output handler only
        DIG_process(DIG_PROCESS_OUTPUTS_FLAG);
    }
  } else if (GPIO_Pin == ESC_SYNC_Pin) {
      ESC_updateALevent();
      DIG_process(DIG_PROCESS_APP_HOOK_FLAG | DIG_PROCESS_INPUTS_FLAG);
   }
}

However, after getting into the Operational state, the ESI stops sending PDI to interrupt MCU. As a result, MCU no longer processes the output.

Have you tried what I mentioned above? Why do we need to process the interrupt in the while()?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions