SPRUJ79 November 2024 F29H850TU , F29H859TU-Q1
In this mode, each of the 10 channels can be set to a software configurable priority of 0 to 3 using the registers SWPRI1 (for channels 1-8) and SWPRI2 (for channels 9-10). The channels can be assigned priority orthogonally, that is, any channel can be set to any priority. The lowest priority number implies highest priority during arbitration. When the same priority number is assigned to multiple channels, during the arbitration, the channel with lowest channel number assigned wins the arbitration. All the channels are set to a default priority of 1.
A channel with PRI = 0 is considered as a special case. In this mode, if a channel with PRI = 0 event occurs, the current word transfer (read then write) on any other channel is completed (not the complete burst) and execution is halted. The channel with PRI = 0 is then serviced for the complete BURST count. When this channel with PRI = 0 burst is complete, execution returns to the channel that was active when the channel with PRI = 0 event occurred. The configuration listed below is one use case of how priority levels can be used to enhance RTDMA operation.
| Higher priority: | CH5 (PRI = 0) |
| Lower priority: | CH3 (PRI = 1) → CH12(PRI = 2) → CH1(PRI = 3 → CH15(PRI = 4) → CH6(PRI = 5) → CH2(PRI = 6) → … |
Multiple channels can be configured to be PRI = 0. Another example is when CH1, CH4, and CH5 are enabled in Channel 1 high-priority mode and CH4 is currently being processed. CH1 and CH5 both receive an interrupt trigger from the respective peripherals before CH4 completes. CH1 and CH5 are now both pending. When the current CH4 word transfer is completed, regardless of whether the RTDMA has completed the entire CH4 burst, CH4 execution is suspended and CH1 is serviced. After the CH1 burst completes, CH4 resumes execution.