-1

I have some programming knowledge with regards to Arduino and Msp430 (using Embedded C). But, I am unable to understand where to start learning when it comes to LPC4370. I have a requirement for programming the above mentioned chip but I don't find any material that explains the various function that can be used in programming the LPC4370. LPCopen has a lot of codes but I can find out the utility of various functions used. If someone could give a hint on where to start, it would be really helpful. Thanks in advance.

user3264385
  • 1
  • 1
  • 4
  • I have not worked with lpc 4370 but I have worked with lpc2148. You can download lpc expresso ide. Then you can download freertos book. and Start creating simple task and before that learn how to create projects in lpc IDE . I am sure you will surely reach your destination – Punit Vara Dec 07 '15 at 16:41
  • Thanks a lot. Could you provide the link for the book if possible? – user3264385 Dec 07 '15 at 16:51
  • Is this the suggestion you are looking for ? so I will give everything in answer . So you can accept the answer – Punit Vara Dec 07 '15 at 16:54
  • yes i was looking for some suggestion such as this. – user3264385 Dec 07 '15 at 16:59
  • Link not available but shortly I will update my answer with it. I have that book I will upload and provide you link wait for a while – Punit Vara Dec 07 '15 at 17:04
  • the nxp website has lots of information, the datasheet and users guide for that chip contain over 99% of what you need for the nxp side of things then get the arm docs for the processor core information. – old_timer Dec 07 '15 at 20:33

1 Answers1

0

I have not worked with LPC 4370 but I have experience with lpc2148.

Few things I would suggest you :

  1. Download LPCEXPRESSO IDE from here

  2. Download LPCXPRESSO IDE GUIDE from here

  3. Learn how to create projects . How to load into hardware.

  4. Then learn to create simple task from rtos like FreeRTOS

Read this ST manual for various RTOS function

Here is sample program of creating simple task. you can refer and similarly you can read following exercises and proceed.

/*
    FreeRTOS V6.1.1 - Copyright (C) 2011 Real Time Engineers Ltd.

    This file is part of the FreeRTOS distribution.

    FreeRTOS is free software; you can redistribute it and/or modify it under
    the terms of the GNU General Public License (version 2) as published by the
    Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
    ***NOTE*** The exception to the GPL is included to allow you to distribute
    a combined work that includes FreeRTOS without being obliged to provide the
    source code for proprietary components outside of the FreeRTOS kernel.
    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
    more details. You should have received a copy of the GNU General Public
    License and the FreeRTOS license exception along with FreeRTOS; if not it
    can be viewed here: http://www.freertos.org/a00114.html and also obtained
    by writing to Richard Barry, contact details for whom are available on the
    FreeRTOS WEB site.

    1 tab == 4 spaces!

    http://www.FreeRTOS.org - Documentation, latest information, license and
    contact details.

    http://www.SafeRTOS.com - A version that is certified for use in safety
    critical systems.

    http://www.OpenRTOS.com - Commercial support, development, porting,
    licensing and training services.
*/




#include "FreeRTOS.h"

#include "task.h"


/* Demo includes. */
#include "basic_io.h"

/* Used as a loop counter to create a very crude delay. */
#define mainDELAY_LOOP_COUNT        ( 0xfffff )

/* The task functions. */
void vTask1( void *pvParameters );
void vTask2( void *pvParameters );

int main( void )
{
    /* Init the semi-hosting. */

    printf( "\n" );
    /* Create one of the two tasks. */
    xTaskCreate(    vTask1,     /* Pointer to the function that implements the task. */
                    "Task 1",   /* Text name for the task.  This is to facilitate debugging only. */
                    240,        /* Stack depth in words. */
                    NULL,       /* We are not using the task parameter. */
                    1,          /* This task will run at priority 1. */
                    NULL );     /* We are not using the task handle. */

    /* Create the other task in exactly the same way. */
    xTaskCreate( vTask2, "Task 2", 240, NULL, 1, NULL );

    /* Start the scheduler so our tasks start executing. */
    //

    vTaskStartScheduler();




    for( ;; );
    return 0;
}
/*-----------------------------------------------------------*/

void vTask1( void *pvParameters )
{
const char *pcTaskName = "Task 1 is running\n";
volatile unsigned long ul;

    /* As per most tasks, this task is implemented in an infinite loop. */
    for( ;; )
    {
        /* Print out the name of this task. */

        vPrintString( pcTaskName );


        /* Delay for a period. */
        for( ul = 0; ul < mainDELAY_LOOP_COUNT; ul++ )
        {
            /* This loop is just a very crude delay implementation.  There is
            nothing to do in here.  Later exercises will replace this crude
            loop with a proper delay/sleep function. */
        }
    }

    //??????delete your task
}

void vTask2( void *pvParameters )
{
const char *pcTaskName = "Task 2 is running\n";
volatile unsigned long ul;

    /* As per most tasks, this task is implemented in an infinite loop. */
    for( ;; )
    {
        /* Print out the name of this task. */
        vPrintString( pcTaskName );

        /* Delay for a period. */
        for( ul = 0; ul < mainDELAY_LOOP_COUNT; ul++ )
        {
            /* This loop is just a very crude delay implementation.  There is
            nothing to do in here.  Later exercises will replace this crude
            loop with a proper delay/sleep function. */
        }
    }
}
/*-----------------------------------------------------------*/
void vApplicationMallocFailedHook( void )
{
    /* This function will only be called if an API call to create a task, queue
    or semaphore fails because there is too little heap RAM remaining. */
    for( ;; );
}
/*-----------------------------------------------------------*/


void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName )
{
    /* This function will only be called if a task overflows its stack.  Note
    that stack overflow checking does slow down the context switch
    implementation. */
    for( ;; );
}
/*-----------------------------------------------------------*/


void vApplicationIdleHook( void )
{
    /* This example does not use the idle hook to perform any processing. */
}
/*-----------------------------------------------------------*/


void vApplicationTickHook( void )
{
    /* This example does not use the tick hook to perform any processing. */
}

What type of example you can practice ? it can be found here

Punit Vara
  • 3,744
  • 1
  • 16
  • 30