FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [March 2015 Threads]
Hi,
In this post about counting sempahores:
https://sourceforge.net/p/freertos/discussion/382005/thread/5e30e7e0/
there was a link to implementing interrupts. I'm using a PIC32MX and I believe I have a conflict between my UART and USB interrupts. When I don't use USB, my UART receive interrupt works fine. With USB data going back and forth, somehow I get an occasional byte in my UART ISR which is corrupted.
I'm really confused about the max priority level in FreeRTS configuration and how I should configure the priorities of my ISRs.
My UART interrupt is defined as follows, I believe in agreement with the FreeRTOS requirements:
void attribute( (interrupt(IPL3SOFT), nomips16, vector(UART2VECTOR))) U2InterruptWrapper(void);
But my USB ISR is defined by the Microchip USB implementation as follows:
void attribute((interrupt(), vector(USB1_VECTOR))) _USB1Interrupt( void );
If I make USB priority 2, I get a general exception. If I make it 4, I still have the data corruption.
BTW, the corruption is weird. At random times, my receive data buffer has a byte replaced by the byte received 3 bytes prior to the current byte. It's as if the buffer index is modified, and always by a 3 byte offset.
Any suggestions?
Thanks,
Dave
Are both interrupts using the FreeRTOS API, or just the UART interrupt?
Regards.
The USB interrupt does not use the FreeRTOS wrapper. I might try adding that in now.
Thanks,
Dave
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.