1 / 17

ECSE436 Tutorial

ECSE436 Tutorial. HWI Laurier Boulianne. Questions. Outline. Polling vs Hardware Interrupts Interrupts Interrupts Implement Interrupts on the C6713 Assignments. POLLING vs HWI. 2 ways to get information in and out Polling Hardware Interrupts HWI is more efficient.

Download Presentation

ECSE436 Tutorial

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ECSE436 Tutorial HWI Laurier Boulianne

  2. Questions

  3. Outline • Polling vs Hardware Interrupts • Interrupts • Interrupts • Implement Interrupts on the C6713 • Assignments

  4. POLLING vs HWI • 2 ways to get information in and out • Polling • Hardware Interrupts • HWI is more efficient

  5. Hardware Interrupts

  6. Hardware Interrupts

  7. Hardware Interrupts

  8. Interrupt Handler • Create a project as usual, make sure to create a DSP/BIOS configuration file • In order to enable interrupts, we need to do a few changes in the configuration file (.cdb).

  9. Interrupt Handler • First, in the configuration manager, expand the scheduling folder • Right-click on the “TSK - Task Manager” item, select “Properties”, and ensure that the Task Manager is NOT enabled

  10. Interrupt Handler • Expand the “HWI - Hardware Interrupt . . .” item, and select any of the interrupts from HWI INT4 to 15. Right-click on it, select properties.

  11. Interrupt Handler • Change the “Interrupt Source” to “MCSP 1 Receive”, and the “function” to the name of your interrupt handling routine, preceded by an underscore

  12. Interrupt Handler • Still in properties, select the “Dispatcher” tab, and enable it. Leave the other values unchanged.

  13. Changes in your C code • In your main function, after all other initializations are done (DSK6713 init(), AIC23 configs, etc.), write • IRQ_enable(IRQ_EVT_RINT1); • IRQ_globalEnable();

  14. Changes in your C code • Finally, write your ISR. • Do not forget to use the name that you entered in the configuration manager (minus the underscore) void myHandler(void) { ...your code... }

  15. Double Buffering • Remember that you need some way to process the data without it being overwritten with new data, so you need to implement some sort of double-buffering scheme A Process Data Write Data B

  16. Questions

  17. Assignments • Read C6713 One-day Workshop from TI (chapter 2) (WebCT) • Redo exercise given in the handout, but this time handle the I/O with interrupts instead of polling

More Related