ADC Software Trigger on LPC1549

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

ADC Software Trigger on LPC1549

1,266 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by samedtopal on Mon Dec 21 05:03:41 MST 2015
Hi,

my Name is Samed Topal. I have a issue, in my project i use the LPC1549 microcontroller only. Now i want to use the ADC with a software trigger. I red the LPC1549 manuel on page 481. There is a 4 way example how to use or create a software trigger interrupt.

But my problem is, that i can not configurate the part 3. I mean there stay that i have to disable the "Disconnect the ADC0_PINTRIG0 from any pin by writing 0xFF to the PINASSIGN10 register bits ADC0_PIN_TRIG0_I." How schould i do this, if i don't have the Register in any header-file? I searched for the bits but there isn't any defines.

DO someone use the ADC with software trigger? ANd how did you do this? And how did you configurate your ADC?

Please help

Thank you

Samed Topal
Labels (1)
0 Kudos
Reply
5 Replies

1,119 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by samedtopal on Thu Dec 24 12:26:26 MST 2015
Thank you mc,

i will try this. But it looks not nice to me. I don't know how the PINSASSIGN Register Structure will help me. Becouse i have to set the ADC0_PIN_TRIG0 to zero, which is 8 bits.

Did you anderstand my issue?

I have problems on the 3th part of the Software trigger adc part in the manuel, which is this bits.

Thank you
0 Kudos
Reply

1,119 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Wed Dec 23 10:44:00 MST 2015
Hi Samed,
Please check swm_15xx.h for ADC0_PIN_TRIG0. It is define there as
SWM_ADC0_PIN_TRIG0_I    = 0xA3,

See the PINASSIGN10 register in below structure again. By the way the default value of this register is 0xFF.


Quote:
typedef struct {
__IO uint32_t PINASSIGN[16];/*!< Pin Assignment register array */
__I  uint32_t RESERVED0[96];
__IO uint32_t PINENABLE[2];/*!< fixed pin enable/disable registers */
} LPC_SWM_T;



Also LPC_SWM_BASE is defined in chip.h as 0x40038000


Quote:
#define LPC_SWM_BASE              0x40038000



Hope it helps.
0 Kudos
Reply

1,119 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by samedtopal on Wed Dec 23 09:32:37 MST 2015
Hi R2D2,

the problme is not to use the periph_adc. I use it, but i want to trigger the adc by myself, not with the SysTick Interrupt. In the manuel there are a 4 way, how to setup a software trigger interrupt for the adc. But there are some pins, which i can not set to 0 becouse there are no defines for it.

Did i tell the issue correctly?

Thank you
0 Kudos
Reply

1,119 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Wed Dec 23 05:54:04 MST 2015
Hi samed,
As mentioned by R2D2, please download lpcopen version 2.08c code from
https://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc15xx-packages

The ADC examples, ADC is triggered by systick interrupt.
0 Kudos
Reply

1,119 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Mon Dec 21 06:06:14 MST 2015

Quote: samedtopal
DO someone use the ADC with software trigger? ANd how did you do this? And how did you configurate your ADC?

Please help



What's wrong with the periph_adc sample  :O

It's setting up the sequencer and SysTick is starting it...
0 Kudos
Reply