Part Number: AM2432
Hi TI Experts,
Few month ago my colleague asked about this, AM2432: Sigma delta ISR entrance moment jitter in R5F - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums
I have further looked into the issue. It seems there are codes in the SDK that they would disable the interrupt.
For example, in function bsp_send_command_to_firmware(), which is called by various EtherCAT related functions.
void bsp_send_command_to_firmware(PRUICSS_Handle pruIcssHandle,
uint32_t command,
uint16_t param1, uint16_t param2)
{
volatile t_host_interface *pHost2PruIntfc = (volatile t_host_interface *)
((((PRUICSS_HwAttrs *)(pruIcssHandle->hwAttrs))->baseAddr) +
PRUICSS_DATARAM(0));
{
#ifdef ENABLE_PDI_TASK
SemaphoreP_pend(&semcmdlow_object, SystemP_WAIT_FOREVER);
#else
uintptr_t key1 = HwiP_disable();
#endif
bsp_pruss_cmd_intfc_write_word(command, &pHost2PruIntfc->cmdlow);
bsp_pruss_cmd_intfc_write_word(param1, &pHost2PruIntfc->param1low);
bsp_pruss_cmd_intfc_write_word(param2, &pHost2PruIntfc->param2low);
#ifdef SUPPORT_CMDACK_POLL_MODE
bsp_pruss_cmd_intfc_write_word(1, &pHost2PruIntfc->cmdlow_ack);
#endif
PRUICSS_sendEvent((g_bsp_params.pruicss_handle), ARM_PRU_EVENT1);
ASSERT_DMB();
ASSERT_DSB();
{
#ifdef SUPPORT_CMDACK_POLL_MODE
volatile uint16_t ack;
do
{
ack = bsp_pruss_cmd_intfc_read_word(&pHost2PruIntfc->cmdlow_ack);
}
while(ack);
#ifndef ENABLE_PDI_TASK
HwiP_restore(key1);
#endif
#else
uint32_t evtoutNum = HOST_CMD_LOW_ACK_EVENT - 20;
#ifndef ENABLE_PDI_TASK
HwiP_restore(key1);
#endif
PRUICSS_waitEvent((PRUICSS_Handle)(g_bsp_params.pruicss_handle), evtoutNum);
#endif
}
bsp_pruss_cmd_intfc_write_word(0xFF, &pHost2PruIntfc->cmdlow);
#ifdef ENABLE_PDI_TASK
SemaphoreP_post(&semcmdlow_object);
#endif
}
}
When I uses SDFM 3-channel example from SDK, the jitter from ISR is reduced to 300 ns. So I believe the the cause that jitter goes to 4 us.
I'll try to locate all code sections that cause the issue, as I searched hwiP_disable, there are quite some matches,

SPI and UART are used, they might also be the cause.
For the test I have down is that I first comment out some functions, the frequncy is improved from

to

I'll update the thread every time I locate a code section that we use and disables interrupt. And want to know if it is necessary to keep the implementation.