Hello all,
I'm wandering around the code of the BSP for the F7 family and am currently trying to port it to a Nucleo H7 board.
These #define directives stuck me a little in Platform.h. Why are these CAN interrupts triggering pumps ? Is this for timing purpose ? Can these IRQ be ignored ?
8:43am
Audio Weaver needs preemptible software interrupts. The interrupt table as defined by ST provides default interrupt assignments mostly defined to service hardware devices. If you do not need to service certain devices (in the case above CAN devices) you can use those interrupts for your software interrupt.
10:16am
Thanks Chris. I still don't get what triggers the IRQs. Or is just defining these functions as IRQ gives them special execution privileges (uninterruptible) ?
Also, they are not called from anywhere else in the BSP, so really, I don't get it.
10:20am
In our BSP sample code we have this:
// Higher Level AWE Processing Interrupt
HAL_NVIC_SetPriority(AudioWeaverPump_IRQ1, 5, 0);
HAL_NVIC_EnableIRQ(AudioWeaverPump_IRQ1);
// Lower level AWE Processing Interrupt
HAL_NVIC_SetPriority(AudioWeaverPump_IRQ2, 6, 0);
HAL_NVIC_EnableIRQ(AudioWeaverPump_IRQ2);
Then we use it like this:
nComplete |= awe_fwAudioDMAComplete(&g_AWEInstance, nPinNdx, AWE_FRAME_SIZE);
if (nComplete)
{
layoutMask = awe_fwEvalLayoutMask(&g_AWEInstance, NULL);
if (layoutMask & 1)
{
if (!g_bAudioPump1Active)
{
NVIC_SetPendingIRQ(AudioWeaverPump_IRQ1);
}
}
if (layoutMask & 2)
{
if (!g_bAudioPump2Active)
{
NVIC_SetPendingIRQ(AudioWeaverPump_IRQ2);
}
}
}
10:54am
Ok got it now ! Thanks Chris.