| Electronic Components Datasheet Search |
|
AN4623 Datasheet(PDF) 8 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4623 Datasheet(HTML) 8 Page - STMicroelectronics |
|
8 / 16 page ![]() Application: memory monitor using JDC module AN4623 8/16 DocID027178 Rev 1 2 Application: memory monitor using JDC module 2.1 Overview This application note describes how to use the JDC module to implement a memory monitor. To do this, the application implemented uses JOUT_IPS register to get out the data and the JOUT Flag of MSR register to synchronize the external tool. 2.2 Implementation The memory monitored is a 10 elements buffer of 8 bits. The application transfers the content of each element of the buffer into the JOUT_IPS register and waits for the tool read the data. When the tool read the data, the JOUT_INT (JOUT interrupt) occurs. At this point the application can put a new data into JOUT_IPS register. Following the buffer used by application: • uint8_t *buffer[MAX_BUFFER];//Buffer containing the RAM variable address to monitor • uint32_t nbuffer = 0;//buffer index used to indicate the next element to send The first step consists of enabling of the JOUT interrupt: • JDC.MCR.B.JOUT_IEN = 0x1; //Enable JOUT Interrupt • INT_IRQ_INIT(JDC_JOUT_INT, JDC_JOUT_INT_PRIORITY); //Set priority for JDC JOUT interrupt The second step consists of setting first time the JOT_IPS register to activate the process monitor: • JDC.JOUT_IPS.R = *(buffer[nbuffer]); The code below is the ISR (Interrupt Service Routine) executed each time the JOUT_INT occurs: void JDC_JOUT_ISR(void) { JDC.MSR.R = 0x1;//Clear JOUT interrupt flag; nbuffer++;//Increase buffer index counter if (nbuffer == MAX_BUFFER)//Check if buffer index counter reach the MAX_BUFFER value { nbuffer = 0;//reset buffer index counter } JDC.JOUT_IPS.R = *(buffer[nbuffer]);//update JOUT register value } |
|
|
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 |