| công cụ tìm kiếm bảng dữ liệu linh kiện điện tử |
|
ST20-C1 bảng dữ liệu(PDF) 54 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
ST20-C1 bảng dữ liệu(HTML) 54 Page - STMicroelectronics |
|
54 / 205 page ![]() 4.11 Peripherals and I/O 54/205 ® 1 The CPU saves the task descriptor of the current process in the exception vector table at the exception level for the peripheral. 2 The CPU tells the peripheral the number of bytes to be read or written, the address of the start of the data or input buffer. 3 The CPU signals to the peripheral that the job can start. 4 The CPU deschedules the process, using the stop instruction, to wait for the peripheral to complete the job. 5 The CPU executes other processes while the peripheral performs the job. 6 The peripheral completes the job and sends a micro-interrupt to the CPU, with the exception level. 7 The CPU reads the exception vector table and recognises the entry as a user process. The process is added to the back of the scheduling queue, or if the schedule execution trap is enabled then the trap is taken. The code to execute steps 3 to 4 must not be interrupted, since otherwise the periph- eral job may be completed before the process is descheduled by a stop instruction, which may crash the processor. Interrupts may be temporarily disabled by clearing the local_interrupt_enable bit of the status register, which is set automatically when the process is descheduled. Steps 5 to 7 happen automatically and need no coding. The code to drive the peripheral will depend on the peripheral and the interface to it. Typically the parameters (e.g. the byte count and the buffer address) would be written to memory mapped registers and then a further write would be needed to start the peripheral job. The code to perform a DMA to transmit param_count bytes to or from param_buffer using exception level except_level where the DMA registers periph_count, periph_buffer and periph_start are in a block at peripheral would be similar to the following: ldtdesc; ld ExceptionBase; stnl except_level; ld param_count; ld peripheral; stnl periph_count; rev; ld param_buffer; stnl periph_buffer; ldc local_interrupt_enable; bitmask; statusclr; rot; ldc start_value; arot; stnl periph_star t; stop; The process will resume at the next instruction after the stop when the peripheral job is complete. Single tasking For programs which are not multi-tasking, it is not desirable to deschedule the program while the peripheral is busy. The main program should continue with other jobs while the peripheral is busy. An interrupt handler can be written to signal to the main program that the peripheral job is complete. The descriptor of the interrupt handler exception control block is placed in the exception vector table. The descriptor |
|
Link URL |
| Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không? [ DONATE ] |
Alldatasheet là | Quảng cáo | Liên lạc với chúng tôi | Chính sách bảo mật | Liên kết đến bảng dữ liệu | Trao đổi link | Tìm kiếm theo nhà sản xuất All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |