2022-09-19 02:21 AM
Hi
I'm using STM32H750VB to read an external ADC using SPI and triggerred by an external interrunpt pin. The interval of reading is 1ms. I send a event in gpio interrupt and read data in a thread. The application run as my expect in starting. But after a while (may be 20s to 20min), it cannot trigger data reading in thread. I check the event, and found tx_event_flags_group_suspened_list is not a thread. Can anyone help me? Thanks.
Interrupt code
void data_ready_int_cb(uint16_t pin)
{
tx_event_flags_set(&os_event,1,TX_OR);
}
thread code
static uint32_t dummy_data[10] = {0};
void drv_ads131_dev_data_read_thread(ULONG input)
{
uint32_t event;
drv_ads131m08_open(0,0);
drv_exti_cb_register(ADS_DRDY_Pin,data_ready_int_cb);
while(1)
{
if(TX_SUCCESS == tx_event_flags_get(&os_event,1,TX_OR_CLEAR,(ULONG *)&event,500))
{
uint32_t data[10];
uint32_t index = ads131_resource.sw_resource.index;
ads131_resource.hw_resource.bus->Transfer(dummy_data,data,10);
memcpy(&ads131_resource.sw_resource.data[index],data,40);
ads131_resource.sw_resource.index = (index+1)%10;
}
else
{
HAL_GPIO_TogglePin(LED_GPIO_Port,LED_Pin);
}
}
}