LPC1549 ADCx FLAGS register read only in LPCxpresso V8.2

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC1549 ADCx FLAGS register read only in LPCxpresso V8.2

Jump to solution
991 Views
michelkuenemann
Contributor III

Hi all,

I am using ADC1 of an LPC1549 in sequential mode. My LPCxresso version is:

LPCXpresso v8.2.0 [Build 647] [2016-07-18] 

UM10736 rev 1.1 Page 509/759 says:

Bit 28 SEQA_INT Sequence A interrupt/DMA trigger.

"If the MODE bit in the SEQA_CTRL register is 1, this flag will be set upon completion of an
entire A sequence. In this case it must be cleared by writing a 1 to this SEQA_INT bit."

In my interrupt routine (void ADC1_SEQA_IRQHandler (void)) I have added following line :

 LPC_ADC1->FLAGS |= ( 1 << 28);

LPCxpresso complains with the following message: error: assignment of read-only member 'FLAGS'

So currently I have to clear this bit "by hand" with the following code (if I do not do it, the proc is stuck in the interrupt routine) :

// ADC1 flags register address

ulong *p = (ulong *) 0x40080068; 
ulong q;

q = *p;
q |= (1<< 28);
*p = q;

Is there an issue in LPCxpresso or have I missed something ?

Thanks you,

Regards,

Michel Kuenemann

Labels (1)
Tags (2)
0 Kudos
Reply
1 Solution
680 Views
thefallguy
Contributor IV

That will be a problem with the ADC include file, nothing to do with lpcxpresso. Where did the include file come from? Lpcopen? If this really is an error, you can just edit the file yourself to fix it. And report it to the appropriate forum for somebody in nxp to fix permanently.

View solution in original post

2 Replies
681 Views
thefallguy
Contributor IV

That will be a problem with the ADC include file, nothing to do with lpcxpresso. Where did the include file come from? Lpcopen? If this really is an error, you can just edit the file yourself to fix it. And report it to the appropriate forum for somebody in nxp to fix permanently.

680 Views
michelkuenemann
Contributor III

Hello,

Thanks for your help:

1 - YES, the files comes from LPCopen

2 - I have patched the file like this

Was:  __I  uint32_t  FLAGS;  

Is:  __IO  uint32_t  FLAGS;  

this has fixed the issue.

On which forum should I report this issue ?

Michel

0 Kudos
Reply