主题中讨论的其他部件:HALCOGEN
大家好,
我正在使用开发板Launchxk2-570lc43。 将HalCoGen配置为与FreeRTOS配合使用。 然后,在主代码中,我创建了两个任务,一个是读取ADC,另一个是读取sci。 在配置中,启用SCI3读取中断,并在VIM中启用相应的中断。 问题是中断不工作。 即,在对sci3HighLevelInterrupt的调用中,我在调试它时放置了一个断点,但它从未进入。
因此,它永远不会进入我在代码中实现的sciNotification函数:
int main(void)
{
/* USER CODE BEGIN (3) */
hardwareInit();
/* create a queue and semaphore to collect a line and flag the end of it */
g_uartQ = xQueueCreate(32, sizeof(char));
vSemaphoreCreateBinary(flagEOL);
/* Create Task 1 */
if (xTaskCreate(prvTaskADCRead,"TaskADCRead", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY+1, &xTask1Handle) != pdTRUE)
{
/* Task could not be created */
while(1);
}
if (xTaskCreate(prvTaskCMD,"TaskCMD", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY+2, &xTask2Handle) != pdTRUE)
{
while(1);
}
vTaskStartScheduler();
/* USER CODE END */
return 0;
}
函数hardwareInit:
static void hardwareInit(void)
{
/* Se inicializan las 4 uart: SCI1, SCI2, SCI3 y SCI4. SCI
SCI data Format
Baudarate: 115200
Stop bit: 2
Length: 8 */
_enable_interrupt_();
sciInit();
}
和sciNotification:
void sciNotification(sciBASE_t *sci, uint32 flags)
{
static uint8 c;
/* get the byte out of the interrupt register */
sciReceive(sci, 1, &c);
/* put the byte in a queue */
if (xQueueSendFromISR(g_uartQ, &c, 0))
{
/* success */
}
else
{
/* queue send fail: probably full */
}
/* flag the End of the Line */
if (c == '\r')
{
xSemaphoreGiveFromISR(flagEOL, NULL);
}
else
{
sciSend(sci, 1, &c);
}
return;
}
下面是HalCoGen的屏幕截图 :



请告诉我我我做错了什么?
提前感谢。
此致,
Pablo Llull