| Electronic Components Datasheet Search |
|
AN2841 Datasheet(PDF) 18 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2841 Datasheet(HTML) 18 Page - STMicroelectronics |
|
18 / 31 page ![]() Dimming application using an STM32 microcontroller AN2841 18/31 Figure 16. Real signals: timer interrupt + DMA transfer + DMA interrupt model Step "1" in Figure 16 is not necessary, but it is used for a better visualization of the tracking of signals on the oscilloscope. Example of C code of DMA and timer interrupt routine: interrupt + DMA + interrupt approach void SysTickHandler(void) { LE_LOW();(Step 1) LE_HIGH(); depth+=4; if(depth > 0x400) depth = 0; DMA_Channel3->CCR &= CCR_ENABLE_Reset; DMA_Channel3->CNDTR = 0x04; DMA_Channel3->CMAR = ((u32) (LookUp))+depth; DMA_Channel3->CCR |= CCR_ENABLE_Set; (Step 2) DMA_Channel3->CCR |= DMA_IT_TC; LE_LOW(); } void DMAChannel3_IRQHandler(void)(Step 5) { while(!SPI_GetFlagStatus(SPI1, SPI_FLAG_TXE));(Step 6) LE_HIGH();(Step 7) LE_LOW(); DMA_ClearITPendingBit(DMA_IT_GL3); } |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List 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 |