Comments (3)
@dchirgwin , thank you for reporting the issue. We are looking into the issue and will get back.
from csp.
@dchirgwin , This bug got introduced because of a fix done for an errata on PIC32MK devices. On PIC32MK, the transmit interrupt flag does not remain asserted when all characters are transmitted out.
Consider the following scenario, where in the transmit interrupt, after filling the transmit FIFO and before clearing the transmit interrupt flag, another high priority interrupt occurs and the current interrupt execution gets preempted. When the CPU returns back to service the preempted transmit interrupt, all characters may have been transmitted out and the transmit FIFO can be empty. At this point, if the transmit interrupt flag is cleared, then on PIC32MK devices it does not remain asserted even though the condition for the interrupt flag is true. The suggested workaround for this is to clear the interrupt flag before writing to the transmit data register.
However, on devices where the interrupt flag does remain asserted, clearing the interrupt flag while the interrupt condition is true results in interrupt flag getting set again, thereby firing another interrupt. As you rightly mentioned, this gets largely unnoticed because the ISR checks for the txBusyStatus flag and whether the transmit FIFO has space to accept a new character.
Same applies in case of data reception. If the receive interrupt flag is cleared after reading out the receive FIFO and after receiving a new character in the FIFO (again due to another higher priority interrupt preempting the receive interrupt and thereby allowing enough time for a character to be received), then the receive flag remains cleared even though receive FIFO has unread characters.
Hope this provides the clarification.
The issue is fixed now by adding the workaround only for PIC32MK devices. The fix will be part of the next release - v3.8. Thank you again for reporting the issue.
from csp.
Fixed as part of v3.8.0
from csp.
Related Issues (20)
- SPI Library Documentation HOT 2
- 2 CANFD on PIC32MK1024MCM100 HOT 4
- Wrong variable usage in SPI slave tempates HOT 2
- Accessor to tickCounter in interrupt HOT 4
- exceptionsHandler.s.ftl HOT 2
- Vector Table incorrectly defined HOT 3
- Unable to update package using content manager HOT 1
- Harmony Configurator's Pin Configuration and Peripherals availability for SAMD10C14A differs from datasheet HOT 4
- PWM0_CH3 not listed in configuration for ATSAME70N19B HOT 3
- SMBus features request for PIC32MZ series devices. HOT 1
- Harmony Configurator's Pin Configuration and Peripherals availability for PIC32MK1024MCM100 differs from datasheet HOT 1
- UARTx_SerialSetup HOT 14
- Extended CAN template issue HOT 2
- PIC32MZW WTD reset clock initialisation HOT 3
- Infinite loop in SDHC driver.
- How to send and receive CAN FD Frames with more than 8 Bytes of data.
- The RTCC_TimeGet() function of plib_rtcc.c does not use a standard tm struct.
- ADCHS Filter Interrupt handler called twice
- Pins Missing in 3.19.2 HOT 2
- Released csp requires PIC32CX-SG41_DFP v1.4.136 which is not released.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from csp.