-
Notifications
You must be signed in to change notification settings - Fork 40
Closed
Description
Enabling Software Interrupts Appears to Freeze Program
Using the ARM NVIC appears to freeze the apollo3 microcontroller a short while after the PDM IRQ is enabled.
My workbench
- I'm using an Artemis Blackboard ATP with version 1.0.2 of the SparkFun Apollo Library
- It is connected over a USB-C cable and is using the onboard microphone
- This is being powered over the USB port on my Laptop
Steps to reproduce
To do this, I started adapting the code from the pdm_fft example in the apollo3 evaluation board example code. In the init function, it appears the NVIC_EnableIRQ(PDM_IRQn); function call freezes the chip a short while later when the pdm_config_print(); function is called.
The following functions are called as follows:
void pdm_init(void) {
...
// There appears to be an error in this IRQ Enable
// Commenting this function apperars to solve this issue,
// although I believe this means the code can no longer be interrupt-driven
NVIC_EnableIRQ(PDM_IRQn);
}void setup () {
...
//
// Turn on the PDM, set it up for our chosen recording settings, and start
// the first DMA transaction.
//
pdm_init();
pdm_config_print();
}Expected behavior
It is expected the interrupt is enabled and the sketch will continue into the pdm_config_print() function.
Actual behavior
The pdm_config_print() function stops output about halfway through the first line it is supposed to print.
Metadata
Metadata
Assignees
Labels
No labels