QDK PIC24/dsPIC-C30 - Quantum Leaps
QDK PIC24/dsPIC-C30 - Quantum Leaps
QDK PIC24/dsPIC-C30 - Quantum Leaps
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Table of Contents<br />
1 Introduction ..................................................................................................................................................... 1<br />
1.1 About QP .................................................................................................................................................... 2<br />
1.2 About the QP Port to <strong>PIC24</strong>/<strong>dsPIC</strong> ............................................................................................................. 3<br />
1.3 What’s Included in the <strong>QDK</strong>-<strong>PIC24</strong>-<strong>dsPIC</strong> ................................................................................................... 4<br />
1.4 Licensing QP .............................................................................................................................................. 4<br />
2 Getting Started ................................................................................................................................................ 5<br />
2.1 Software Installation ....................................................................................................................................... 5<br />
2.2 Building the QP Libraries ............................................................................................................................... 7<br />
2.3 Building and Running the Examples .............................................................................................................. 8<br />
3 Non-Preemptive “Vanilla” Port ...................................................................................................................... 12<br />
3.1 The qep_port.h Header File ........................................................................................................................... 12<br />
3.2 The qf_port.h Header File .............................................................................................................................. 12<br />
3.3 ISRs in the Non-Preemptive “Vanilla” Configuration ...................................................................................... 14<br />
3.4 QP Idle Loop Customization in QF_onIdle() ................................................................................................... 16<br />
4 Preemptive Configuration with QK ................................................................................................................ 17<br />
4.1 QK-specific ISR Entry and Exit Macros (file qk_port.h) .................................................................................. 17<br />
4.2 ISRs with the Preemptive QK Kernel ............................................................................................................. 19<br />
4.3 Idle Loop Customization in the QK Port ......................................................................................................... 22<br />
4.4 Testing QK Preemption Scenarios ................................................................................................................. 23<br />
5 Implementing “Zero Interrupt Latency” with the NMI .................................................................................. 26<br />
5.1 Communication between NMIs and QP ......................................................................................................... 26<br />
5.2 Implementation Considerations for the NMIs ................................................................................................. 26<br />
6 BSP for the Explorer 16 Board ....................................................................................................................... 27<br />
6.1 Setting the Sizes of Stack and Heap .............................................................................................................. 27<br />
6.2 The BSP header file bsp.h ............................................................................................................................. 28<br />
6.3 BSP initialization ............................................................................................................................................ 28<br />
6.4 Starting Interrupts in QF_onStartup() ............................................................................................................. 28<br />
6.5 Assertion Handling Policy in Q_onAssert() .................................................................................................... 28<br />
7 The QS Software Tracing Instrumentation ................................................................................................... 30<br />
7.1 QS Time Stamp Callback QS_onGetTime() ................................................................................................... 31<br />
7.2 QS Trace Output in QF_onIdle()/QK_onIdle() ................................................................................................ 33<br />
7.3 Invoking the QSpy Host Application ............................................................................................................... 33<br />
8 Related Documents and References ............................................................................................................. 34<br />
9 Contact Information ........................................................................................................................................ 35<br />
Copyright © <strong>Quantum</strong> <strong>Leaps</strong>, LLC. All Rights Reserved.<br />
i