Combining BLE Application with Existing Project
Hi all,
I have been working on a Nucleo 68 board to develop firmware for my project. I have been working in parallel on two projects - one was purely hardware control - read/write to/from various peripheral devices (UART with IT and I2C DMA and External Interrupts). I am very happy with that side and it works perfectly. The other project was pure BLE application, which I have now written and on its own it works perfectly. It is a BLE client that simply gets the data out of a peripheral sensor.
I am however now stuck trying to combine the two projects together. I have seen a similar post https://community.st.com/s/question/0D53W00000dOycq/integration-of-an-existing-project-into-the-sequencer-utilseq however it did not solve the issue. And actually in that post @Christophe Arnal suggests that interrput handlers should remain unaffected by the addition of the sequencer into the project.
These are my observations:
1/ Both projects on their own work perfectly - the same configuration file for both.
2/ Simply combining the projects was expected to fail as the main loop should be wrapped into a function registered to the sequencer, so no surprise there.
3/ However when removed all the other code and just left the BLE Application, the Sequencer and one External Interrupt the interrupt is not registered (though SW3 button).
so this works:
MX_GPIO_Init();
while (1) {
}
.
.
.
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) {
if (GPIO_Pin == SW3_Pin) {
HAL_GPIO_TogglePin(LED_RED_GPIO_Port, LED_RED_Pin);
}
}
but this doesn't:
MX_GPIO_Init();
MX_APPE_Init();
while (1) {
MX_APPE_Process();
}
.
.
.
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) {
if (GPIO_Pin == SW3_Pin) {
HAL_GPIO_TogglePin(LED_RED_GPIO_Port, LED_RED_Pin);
}
}
I guess that would be the first step towards solving the problem. I ahve no problem shoving the entire contents of my while(1) loop into a task, but I don't see a point if a simple interrupt is not working (and my UART runs on interrupts, I2C is signalled through interrupts, and user button also uses those).
When using a debugger - I see that the while(1) loop with MX_APPE_Process() is happily running but the interrupt is never caught.
What could be going wrong here?
Many thanks!
I'm using STM32CubeIDE 1.7.0
STM32CubeMX 6.3.0
and the lastest FUS and BLE Stack from Github: v1.12
