Getting started without library documentation ??

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

Getting started without library documentation ??

2,491 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LvdK on Sat Sep 01 03:22:53 MST 2012
Hello, I am totally new to LPCXpresso and I have the LPC1114 Xpressoboard with the IDE downloaded from CodeRed. I have some experience with MBED which I liked very much.
Now I find getting started with LPCXpresso very difficult.

I like the LPXXpresso IDE with its debugger and the 'blinky' example worked in no time. Great! :)
But then I started to analyse the code and unfortunately my enthousiasm was getting lower... I tried to understand things like GPIOInit and GPIOSetDir but could not find any documentation for these functions. :confused:

Maybe I am foolish newbie and missing something but I cannot find it...
Do I really have to browse tons of examples and include files to understand a function?
If this is true, I am not sure if I will continue with this platform...
If NXP wants people (like me) to start using their 32 bit microcontrollers instead of other 'old' 8/16 bit microcontrollers (like ATMEL) they have a serious problem here. People want an easy way to look things up !
Mbed O.K, but LPCXpresso is much less accessable for newbies.
Must be easy to solve: make some documentation !

So the main question is : WHY is there no documentation ?? :confused:
0 Kudos
Reply
12 Replies

2,476 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sat Sep 15 15:38:37 MST 2012
There are plenty of other fish in the sea :) www.microchip.com/wwwproducts/Devices.aspx?dDocName=en552033 :eek:
0 Kudos
Reply

2,476 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by prancius on Sat Sep 15 15:21:19 MST 2012
i think i will. But with this mcu is long time go to production.
Any way i should shoose have a less components and much more time for develop or more components and few days for programing :) (this is about integrated can tranceiver)
Maybe microchip makes new product :)

Thank you for discusion.
0 Kudos
Reply

2,476 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sat Sep 15 15:10:35 MST 2012
Don't know why. I'm not NXP, not EA and not CodeRed. I don't think that there's an easy approach to Cortex :(

Sooner or later you have to understand User Manual, IDE and Debugger. That's not doable within a few hours or just by copy and paste :)
0 Kudos
Reply

2,476 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by prancius on Sat Sep 15 14:52:33 MST 2012
Why you cant integrate or create library for lpcxpresso like mbed.h or just prepare clear library documention?
0 Kudos
Reply

2,476 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sat Sep 15 14:48:53 MST 2012

Quote: prancius
As i see it is possible to use mbed. It has clear handbook....



... and no Debugger :o
0 Kudos
Reply

2,476 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by prancius on Sat Sep 15 14:43:00 MST 2012
As i see it is possible to use mbed. It has clear handbook....
0 Kudos
Reply

2,476 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by prancius on Fri Sep 14 22:47:15 MST 2012
I also new in nxp.
I am a programmer. Few years working with PIC microcontrollers. Decided to take a look to nxp. And also like LvdK cant find any good documentation how to use simple functions (timers, ports, adc, i2c) there is only examples, but its sounds like reverse ingenering :) Sorry, but you must have documentation to go futher :)

Regards
Pranas
0 Kudos
Reply

2,476 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sun Sep 02 13:55:33 MST 2012
As suggested here: http://support.code-red-tech.com/CodeRedWiki/WikiHome

this video http://www.youtube.com/watch?v=E6vSPloei-0

is also helpful to learn a few Eclipse tricks :)
0 Kudos
Reply

2,476 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LvdK on Sun Sep 02 13:45:29 MST 2012
Thank you Zero, your tip is helpful. :)
I did not know this 'Open Declaration' trick yet because I was only reading code and not very concerned with the editor window yet... :o
It certainly helps to find things faster.
These chips are really powerful and configurable and the IDE looks good so I will go for your 'few hundred hours of programming' ;)
Bye!
0 Kudos
Reply

2,476 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sun Sep 02 12:48:35 MST 2012
Just select this functions and jump via F3(Open Declaration) to gpio.c:

/*****************************************************************************
** Function name:        GPIOInit
**
** Descriptions:        Initialize GPIO, install the
**                        GPIO interrupt handler
**
** parameters:            None
** Returned value:        true or false, return false if the VIC table
**                        is full and GPIO interrupt handler can be
**                        installed.
** 
*****************************************************************************/
void GPIOInit( void )
{
  /* Enable AHB clock to the GPIO domain. */
  LPC_SYSCON->SYSAHBCLKCTRL |= (1<<6);

#ifdef __JTAG_DISABLED  
  LPC_IOCON->R_PIO1_1  &= ~0x07;
  LPC_IOCON->R_PIO1_1  |= 0x01;
#endif

  /* Set up NVIC when I/O pins are configured as external interrupts. */
#if CONFIG_GPIO_DEFAULT_PIOINT0_IRQHANDLER==1
  NVIC_EnableIRQ(EINT0_IRQn);
#endif
#if CONFIG_GPIO_DEFAULT_PIOINT1_IRQHANDLER==1
  NVIC_EnableIRQ(EINT1_IRQn);
#endif
#if CONFIG_GPIO_DEFAULT_PIOINT2_IRQHANDLER==1
  NVIC_EnableIRQ(EINT2_IRQn);
#endif
#if CONFIG_GPIO_DEFAULT_PIOINT3_IRQHANDLER==1
  NVIC_EnableIRQ(EINT3_IRQn);
#endif
  return;
}


/*****************************************************************************
** Function name:        GPIOSetDir
**
** Descriptions:        Set the direction in GPIO port
**
** parameters:            port num, bit position, direction (1 out, 0 input)
** Returned value:        None
**
*****************************************************************************/
void GPIOSetDir( uint32_t portNum, uint32_t bitPosi, uint32_t dir )
{
  if(dir)
    LPC_GPIO[portNum]->DIR |= 1<<bitPosi;
  else
    LPC_GPIO[portNum]->DIR &= ~(1<<bitPosi);
}
#endif
So what's the question here :confused:

If you don't understand this functions, read UM of LPC1114. This is your 'main manual'

There's no manual which explains how to program C or how to use Eclipse :eek:

NXP is a chip selling company and no school. They expect that people can program and use their tool chains. ARM chips are not easy, so reading UM (a few times) and spending a few hundred hours with programming them is indispensable
0 Kudos
Reply

2,476 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LvdK on Sun Sep 02 11:01:19 MST 2012
Thank you cfb, I already found this UM10398 manual and will certainly study it. I will not give up yet.

But still I am very surprised that there is no main manual about the library functions.
WHAT is the reason for this ?? Can't be so much work to make it, does it?
I would help a lot of people to start more easy.

Hope someone can explain why it is not there !
0 Kudos
Reply

2,476 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cfb on Sat Sep 01 18:13:54 MST 2012

Quote: LvdK

But then I started to analyse the code and unfortunately my enthousiasm was getting lower... I tried to understand things like GPIOInit and GPIOSetDir but could not find any documentation for these functions.


Before going any further I recommend you spend some time studying the relevant NXP User Manual (in your case the LPC111x/LPC11Cxx User Manual UM10398). I have found that has always been the best place for me to start when learning how to program both the LPC1xxx and the LPC2xxx microcontrollers. Hopefully, once you understand what has to be done to setup, interrogate and control these highly configurable devices the library calls should make a lot more sense.

You can download a copy from:
www.nxp.com/documents/user_manual/UM10398.pdf
0 Kudos
Reply