|
- curTime=xTaskGetTickCount();
- interval=curTime-lastTime;
- lastTime=curTime;
- if(interval>=5)
- {
- flaggps=0;
- xYieldRequired = xTaskResumeFromISR(xgps);
-
- }
-
- if (USART_GetITStatus(COM_USART[COM], USART_IT_RXNE) != RESET)
- {
- gps_raw_data[flaggps] = USART_ReceiveData(COM_USART[COM]); //???? ???????
- flaggps++;
- }
- if( xYieldRequired == pdTRUE )
- {
- portYIELD_FROM_ISR(xYieldRequired);
- }
复制代码 这是串口接收中断中的一部分,运行之后就会卡在这个位置。- #if( configASSERT_DEFINED == 1 )
- void vPortValidateInterruptPriority( void )
- {
- uint32_t ulCurrentInterrupt;
- uint8_t ucCurrentPriority;
- /* Obtain the number of the currently executing interrupt. */
- ulCurrentInterrupt = vPortGetIPSR();
- /* Is the interrupt number a user defined interrupt? */
- if( ulCurrentInterrupt >= portFIRST_USER_INTERRUPT_NUMBER )
- {
- /* Look up the interrupt's priority. */
- ucCurrentPriority = pcInterruptPriorityRegisters[ ulCurrentInterrupt ];
- /* The following assertion will fail if a service routine (ISR) for
- an interrupt that has been assigned a priority above
- configMAX_SYSCALL_INTERRUPT_PRIORITY calls an ISR safe FreeRTOS API
- function. ISR safe FreeRTOS API functions must *only* be called
- from interrupts that have been assigned a priority at or below
- configMAX_SYSCALL_INTERRUPT_PRIORITY.
- Numerically low interrupt priority numbers represent logically high
- interrupt priorities, therefore the priority of the interrupt must
- be set to a value equal to or numerically *higher* than
- configMAX_SYSCALL_INTERRUPT_PRIORITY.
- Interrupts that use the FreeRTOS API must not be left at their
- default priority of zero as that is the highest possible priority,
- which is guaranteed to be above configMAX_SYSCALL_INTERRUPT_PRIORITY,
- and therefore also guaranteed to be invalid.
- FreeRTOS maintains separate thread and ISR API functions to ensure
- interrupt entry is as fast and simple as possible.
- The following links provide detailed information:
- http://www.freertos.org/RTOS-Cortex-M3-M4.html
- http://www.freertos.org/FAQHelp.html */
- configASSERT( ucCurrentPriority >= ucMaxSysCallPriority ); //这里
- }
复制代码 |
|