Part Number: AM3356
1.How to initialize the ISOM? The following is my initialization code, please help me check. After this initialization code is executed, my program will crash. I'm trying to find out what caused the problem.How to set the "uint32_t duration" for "PN_ISO_initGPIOEvent"?
void PN_ISOM_initTiTo(PN_Handle pnHandle,uint32_t ti_ns,uint32_t to_ns)
{
PN_IsoMConfig* isomConfig = pnHandle->pnIsoMConfig;
(isomConfig->isoMIntConfig)->isrFnPtr = &TiToIsrHandler;
(isomConfig->isoMIntConfig)->args = pnHandle;
To_IsoMHandle=PN_ISO_initGPIOEvent(pnHandle,PNISO_MODE_INTERRUPT,to_ns,0);
Ti_IsoMHandle=PN_ISO_initGPIOEvent(pnHandle,PNISO_MODE_INTERRUPT,ti_ns,0);
PN_ISO_enableGPIOEvent(pnHandle,Ti_IsoMHandle);
PN_ISO_enableGPIOEvent(pnHandle,To_IsoMHandle);
}
2.What need to do in this ISR handler? Which flag is used in ISR to indicate Ti event and To event ?
"User can configure a maximum of two signals in a cycle. These signals
can be used as Ti and To."
void TiToIsrHandler(void* arg)
{
PN_Handle pnHandle = (PN_Handle)arg;
ICSS_EmacBaseAddressHandle_T emacBaseAddr = ((ICSS_EmacHwAttrs *)(
pnHandle->emacHandle)->hwAttrs)->emacBaseAddrCfg;
PN_IntAttrs *intConfig = (pnHandle->pnIsoMConfig)->isoMIntConfig;
PN_clearPruIRQ(emacBaseAddr, intConfig->pruIntNum);
}
