FreeRTOS + LPC11C14 + CAN_on-chip

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

FreeRTOS + LPC11C14 + CAN_on-chip

4,740件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by yanvasilij on Wed Dec 07 04:33:22 MST 2011
Hello! I built FreeRTOS project by using example from this thred http://knowledgebase.nxp.com/showthread.php?t=2601. I added to it some CAN operations (they are all from CAN)on-chip example). All FreeRtos configurations are the same. Here a code
...
includes
...

#define NULL    ((void *)0)


ROM **rom = (ROM **)0x1fff1ff8;

CAN_MSG_OBJ msg_obj;

/* Initialize CAN Controller */
uint32_t ClkInitTable[2] = {
  0x00000005UL, // CANCLKDIV
  0x00000103UL  // CAN_BTR
};

/* Callback function prototypes */
void CAN_rx(uint8_t msg_obj_num);
void CAN_tx(uint8_t msg_obj_num);
void CAN_error(uint32_t error_info);

/* Publish CAN Callback Functions */
CAN_CALLBACKS callbacks = {
   CAN_rx,
   CAN_tx,
   CAN_error,
   NULL,
   NULL,
   NULL,
   NULL,
   NULL,
};

/*CAN receive callback */
/*Function is executed by the Callback handler after
a CAN message has been received */
void CAN_rx(uint8_t msg_obj_num){

  /* Determine which CAN message has been received */
  msg_obj.msgobj = msg_obj_num;

  /* Now load up the msg_obj structure with the CAN message */
  (*rom)->pCAND->can_receive(&msg_obj);

  if (msg_obj_num == 1)
  {
    /* Simply transmit CAN frame (echo) with with ID +0x100 via buffer 2 */
    msg_obj.msgobj = 2;
    msg_obj.mode_id += 0x100;
    (*rom)->pCAND->can_transmit(&msg_obj);
  }

  return;
}

/*CAN transmit callback */
/*Function is executed by the Callback handler after
a CAN message has been transmitted */
void CAN_tx(uint8_t msg_obj_num){
  return;
}

/*CAN error callback */
/*Function is executed by the Callback handler after
an error has occured on the CAN bus */
void CAN_error(uint32_t error_info){
  return;
}

/*CAN interrupt handler */
/*The CAN interrupt handler must be provided by the user application.
It's function is to call the isr() API located in the ROM */
void CAN_IRQHandler (void){
  (*rom)->pCAND->isr();
}

// TASKS================================================================================================
void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed portCHAR *pcTaskName )
{
;
}

void vApplicationIdleHook( void )
{
__WFI();
}

void vTaskCANint(void *pvParameters)
{
        /* vTaskCANint executed */
LPC_GPIO2->DATA |= 2;
msg_obj.msgobj  = 0;
msg_obj.mode_id = 0x345;
msg_obj.mask    = 0x0;
msg_obj.dlc     = 4;
msg_obj.data[0] = 'T';//0x54
msg_obj.data[1] = 'E';//0x45
msg_obj.data[2] = 'S';//0x53
msg_obj.data[3] = 'T';//0x54
(*rom)->pCAND->can_transmit(&msg_obj);
while(1)
{
;
}
}

void vTaskempty(void *pvParameters)
{
LPC_GPIO2->DATA |= 1;
/* vTaskempty executed */
msg_obj.msgobj  = 0;
msg_obj.mode_id = 0x345;
msg_obj.mask    = 0x0;
msg_obj.dlc     = 4;
msg_obj.data[0] = 'T';//0x54
msg_obj.data[1] = 'E';//0x45
msg_obj.data[2] = 'S';//0x53
msg_obj.data[3] = 'T';//0x54
(*rom)->pCAND->can_transmit(&msg_obj);
while(1)
{
;
}
}
//======================================================================================================

int main(void) {

/* Output the Clk onto the CLKOUT Pin PIO0_1 to monitor the freq on a scope */
LPC_IOCON->PIO0_1= (1<<0);
/* Select the MAIN clock as the clock out selection since it's driving the core */
LPC_SYSCON->CLKOUTCLKSEL = 3;
/* Set CLKOUTDIV to 6 */
LPC_SYSCON->CLKOUTDIV = 10;//CLKOUT Divider = 10
/* Enable CLKOUT */
LPC_SYSCON->CLKOUTUEN = 0;
LPC_SYSCON->CLKOUTUEN = 1;
while (!(LPC_SYSCON->CLKOUTUEN & 0x01));

/* Initialize the CAN controller */
(*rom)->pCAND->init_can(&ClkInitTable[0], 1);

/* Configure the CAN callback functions */
(*rom)->pCAND->config_calb(&callbacks);

/* Enable the CAN Interrupt */
NVIC_EnableIRQ(CAN_IRQn);

/* Send a simple one time CAN message */
msg_obj.msgobj  = 0;
msg_obj.mode_id = 0x345;
msg_obj.mask    = 0x0;
msg_obj.dlc     = 4;
msg_obj.data[0] = 'T';//0x54
msg_obj.data[1] = 'E';//0x45
msg_obj.data[2] = 'S';//0x53
msg_obj.data[3] = 'T';//0x54
(*rom)->pCAND->can_transmit(&msg_obj);

/* Configure message object 1 to receive all 11-bit messages 0x400-0x4FF */
msg_obj.msgobj = 1;
msg_obj.mode_id = 0x400;
msg_obj.mask = 0x700;
(*rom)->pCAND->config_rxmsgobj(&msg_obj);

//creating tasks----------------------------------------------------------
xTaskCreate( vTaskCANint, (const signed portCHAR * const)"ping", configMINIMAL_STACK_SIZE,
NULL, 3, NULL);
xTaskCreate( vTaskempty, (const signed portCHAR * const)"counter", configMINIMAL_STACK_SIZE,
NULL, 3, NULL);
//------------------------------------------------------------------------

 LPC_GPIO2->DIR |= 0x3;
  LPC_GPIO2->DATA = 0;

vTaskStartScheduler();

/* if starting Scheduler is failed  */
msg_obj.msgobj  = 0;
msg_obj.mode_id = 0x000;
msg_obj.mask    = 0x0;
msg_obj.dlc     = 4;
msg_obj.data[0] = 0xFF;//0x54
msg_obj.data[1] = 0xFF;//0x45
msg_obj.data[2] = 0xFF;//0x53
msg_obj.data[3] = 0xFF;//0x54
(*rom)->pCAND->can_transmit(&msg_obj);

while(1){
__WFI();/* Go to Sleep */
}
}


So program stops executing (interrupts don't work too) at vTaskStartScheduler();. actually program stops at vPortStartFirstTask() in xPortStartScheduler(). What is wrong? Please help!

void SVCall_Handler(void) execute when vPortStartFirstTask() try to start. In SVCall_Handler while(1) so program is cycled.
0 件の賞賛
返信
23 返答(返信)

4,485件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by stalisman on Fri Dec 09 07:54:10 MST 2011
Nice work Zero!

Your blue faces hide the learning curve on times but the end result is a capability sound check (if that makes sense?).

On a user forum it is always hard for newbies to tread until desperate and in the woods seeing only trees. 

However, your linker files and the eventual map make for a challenge to be met by anyone serious enough to want to get to grips with this ecosystem.

:-)
0 件の賞賛
返信

4,485件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Fri Dec 09 02:18:42 MST 2011

Quote:

#2 Which CAN speed are you trying to receive and which main clock speed are you trying to run?

Could be helpful to answer questions :mad:  Anyway, done your job :eek:

This is a working sample of your mutilated project:

#1 Modified FreeRTOS cr_startup_lpc11.c like stalisman suggested

#2 Included section macros

#3 Excluded CAN RAM area

#4 MCU: LPC11C14

#5 System: 16MHz crystal generating 48MHz main clock

#6 CAN: 500kHz receiving data and transmitting them (ID+0x100) again

#7 CAN: 500kHz transmitting 3 messages: start, 1s delay loop and 2s delay loop
0 件の賞賛
返信

4,485件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Fri Dec 09 01:12:02 MST 2011

Quote: Zero
#2 Which CAN speed are you trying to receive and which main clock speed are you trying to run?



No one can help you, if you don't answer questions :mad:

Is you main clock still 36MHz, your system is trying to receive 375kbit  messages :eek::):eek:
0 件の賞賛
返信

4,485件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by yanvasilij on Thu Dec 08 21:35:13 MST 2011
I succeeded in reserving CAN on-chip memory. But CAN interrupts still  don't work :(. Tasks are starting, messages are sent, but interrupts aren't working. When I didn't commit WEAK void SVCall_Handler(void), WEAK void PendSV_Handler(void), WEAK void SysTick_Handler(void) they execute all the time and FreeRTOS didn't start. May be this is the problem?
0 件の賞賛
返信

4,485件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu Dec 08 06:07:12 MST 2011
I like this historical videos from NXP Discovery Channel :rolleyes:

Of course the modern version is more elegant. Since V3.6 :eek: it's easier to use Managed linker scripts and section macros of cr_section_macros.h.

Then adding 1 :)  line of code is enough:

__BSS(RESERVED) char CAN_driver_memory[0xC0];

See 'Reserved Memory Regions' in http://support.code-red-tech.com/CodeRedWiki/EnhancedManagedLinkScripts

And best of all: Project Wizard is including all this section stuff in my new project if I'm not too dumb to select 'Enable CRP in target image' :)
0 件の賞賛
返信

4,485件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by stalisman on Thu Dec 08 05:30:02 MST 2011

Quote: Zero
No one is using illegal RAM here :eek: If it's used you failed to reserve it :rolleyes:

#1 Obviously you didn't change your own linker script. I suppose you're still running with Managed linker script.




Hi guys,

re #1: FreeRtos is placing its heap in the CAN area.

I followed the 'Modifying Linker Scripts' tutorial at http://ics.nxp.com/support/training/lpcxpresso.intro.2/

.. and managed to reserve the space. The tutorial reserves a tad too much but the ideas are sound.
0 件の賞賛
返信

4,485件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu Dec 08 04:32:59 MST 2011

Quote:

So FreeRTOS steel use CAN on-chip RAM. therefore nothing work.

No one is using illegal RAM here :eek: If it's used you failed to reserve it :rolleyes:

#1 Obviously you didn't change your own linker script. I suppose you're still running with Managed linker script.

#2 Which CAN speed are you trying to receive and which main clock speed are you trying to run?
0 件の賞賛
返信

4,485件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by stalisman on Thu Dec 08 03:26:56 MST 2011
I am a little curiousc...

Is it significant or not that Section 14.4.2 of UM10398 has the following code?

[LEFT][FONT=Arial][SIZE=2][FONT=Arial][SIZE=2]Example call:[/SIZE][/FONT][/SIZE][/FONT][FONT=Arial][SIZE=2]
[/SIZE][/FONT][FONT=Courier][SIZE=2][FONT=Courier][SIZE=2]ROM **rom = (ROM **)(0x1fff1ff8[B] + 2 * sizeof(ROM **));[/B][/SIZE][/FONT][/SIZE][/FONT][FONT=Courier][SIZE=2]
[SIZE=2][FONT=Courier]uint32_t CanApiClkInitTable[2] = {[/FONT][/SIZE]
[SIZE=2][FONT=Courier]0x00000000UL, // CANCLKDIV[/FONT][/SIZE]
[SIZE=2][FONT=Courier]0x00004DC5UL // CAN_BTR[/FONT][/SIZE]
[SIZE=2][FONT=Courier]};[/FONT][/SIZE][/LEFT]
[SIZE=2][FONT=Courier](*rom)->pCANAPI->init_can(&CanApiCanInitTable[0]);[/FONT][/SIZE]



[SIZE=2][FONT=Courier]it differs slightly from that presented earlier.[/FONT][/SIZE]
[/SIZE][/FONT]
0 件の賞賛
返信

4,485件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Thu Dec 08 01:25:01 MST 2011
This just means that you did not reserve a section in memory for the RAM that is used by the on chip CAN driver. So your attempt to reserve memory in the .ld file failed.
Please check again if you made the proper changes and if you changed the file being used (this would not be the first time someone changed a file that is not being used at all...).

If you exactly followed the instruction in the App Note you referred to then you should have created a set of new linker files that are being used. Please only follow this procedure - do not change the default files by hand (they may be overwritten) and make sure that you are using the new files by e.g. making a typo in the file and try to link again - this should result in an error meaning that you are changing the correct file :cool:

Rob
0 件の賞賛
返信

4,485件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by yanvasilij on Thu Dec 08 00:48:00 MST 2011

Quote: Zero
To do what? To fill RAM from 0x10000000 to 0x1000000BF?



here is part of map file:
 .data.SystemCoreClock
                0x10000034        0x4 ./src/system_LPC11xx.o
                0x10000034                SystemCoreClock
 .data.xNextTaskUnblockTime
                0x10000038        0x4 ./src/tasks.o
                0x1000003c                . = ALIGN (0x4)
                0x1000003c  


So FreeRTOS steel use CAN on-chip RAM. therefore nothing work.
0 件の賞賛
返信

4,485件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu Dec 08 00:26:57 MST 2011

Quote:

It didn't help too.  :confused:

To do what? To fill RAM from 0x10000000 to 0x1000000BF?
0 件の賞賛
返信

4,485件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by yanvasilij on Wed Dec 07 23:54:12 MST 2011

Quote: Zero
There are several options. You could use cr_section_macros.h without own linker script or you can just change your own linker script to fill 0xC0 bytes:

    .data : AT (__exidx_end)
    {
[COLOR=Red]     FILL(0x00);
     . = 0x000000C0;[/COLOR]
        _data = .;
        *(vtable)
        *(.data*)
        _edata = .;
    } > RamLoc8



My linker don't have those lines (CAN_on-chip_Debug_lib.ld). I added your code to the linker fully. After that I tried change CAN_on-chip_Debug_lib_mem.ld to this (I read about it in appnout for lpc13xx page 5):


MEMORY
{
  /* Define each memory region */
  MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 /* 32k */
[COLOR=Red]  RamLoc8 (rwx) : ORIGIN = 0x100000B8, LENGTH = 0x1F48 /* 8k */[/COLOR]

}
  /* Define a symbol for the top of each memory region */
  __top_MFlash32 = 0x0 + 0x8000;
[COLOR=Red]   __top_RamLoc8 = 0x100000B8 + 0x1F48; [/COLOR]



It didn't help too. Haw to use cr_section_macros.h to protect  CAN on-chip ram?
0 件の賞賛
返信

4,485件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Wed Dec 07 22:27:21 MST 2011
There are several options. You could use cr_section_macros.h without own linker script or you can just change your own linker script to fill 0xC0 bytes:

    .data : AT (__exidx_end)
    {
[COLOR=Red]     FILL(0x00);
     . = 0x000000C0;[/COLOR]
        _data = .;
        *(vtable)
        *(.data*)
        _edata = .;
    } > RamLoc8
0 件の賞賛
返信

4,485件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by yanvasilij on Wed Dec 07 21:38:35 MST 2011

Quote: Zero
Reserve it :eek:

Did you meanwhile check your map file if someone is using CAN on-chip RAM ?



Well, it seems there is really something  use CAN on-chip RAM... And the the most stupid question in this thread: Haw to reserve it?:o
0 件の賞賛
返信

4,485件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Wed Dec 07 21:27:41 MST 2011
Reserve it :eek:

Did you meanwhile check your map file if someone is using CAN on-chip RAM ?
0 件の賞賛
返信

4,485件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by yanvasilij on Wed Dec 07 21:23:33 MST 2011
It didn't help ((. Haw to protect CAN_on-chip RAM?
0 件の賞賛
返信

4,485件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by yanvasilij on Wed Dec 07 09:25:17 MST 2011

Quote: stalisman
Howdy,

You seem to have a problem with the [B]cr_startup_lpc11.c[/B] file.

It doesn't for example include the functions:

[SIZE=2][LEFT]WEAK [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [B]vPortSVCHandler[/B]([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);
WEAK [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [B]xPortPendSVHandler[/B]([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/LEFT]
WEAK [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [B]xPortSysTickHandler[/B]([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/SIZE]
[SIZE=2][/SIZE]
[SIZE=2]that are defined in port.c.[/SIZE]
[SIZE=2][/SIZE]
[SIZE=2][/SIZE]
[SIZE=2]If you use these in the table instead:[/SIZE]
[SIZE=2][/SIZE]
[SIZE=2][LEFT]vPortSVCHandler, [/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// SVCall handler[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][LEFT]0, [/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// Reserved[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][LEFT]0, [/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// Reserved[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][LEFT]xPortPendSVHandler, [/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// The PendSV handler[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][LEFT]xPortSysTickHandler, [/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// The SysTick handler[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][LEFT]
[/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// [U]Wakeup[/U] sources for the I/O pins:[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][LEFT][/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// PIO0 (0:11)[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// PIO1 (0)
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE]
[SIZE=2][/SIZE]
[SIZE=2]then FreeRTOS runs your tasks.[/SIZE]
[SIZE=2][/SIZE]
[SIZE=2](note I ran it up on a LPC1114 after knocking out the CAN stuff so I don't know if those bits are ok).[/SIZE]
[SIZE=2][/SIZE]




Quote: stalisman
Hi,

I have attached an edited version of the file ... just do a windiff and see :-)



So is there  need just to comment this lines?
/*
WEAK void SVCall_Handler(void);
WEAK void PendSV_Handler(void);
WEAK void SysTick_Handler(void);
*/

Unfortunately, I don't have LPCXpresso at the moment, but I'll check tomorrow. Thank, very match!
0 件の賞賛
返信

4,485件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by stalisman on Wed Dec 07 09:18:42 MST 2011
Hi,

I have attached an edited version of the file ... just do a windiff and see :-)
0 件の賞賛
返信

4,485件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by yanvasilij on Wed Dec 07 09:11:15 MST 2011

Quote: stalisman
Howdy,

You seem to have a problem with the [B]cr_startup_lpc11.c[/B] file.

It doesn't for example include the functions:

[SIZE=2][LEFT]WEAK [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [B]vPortSVCHandler[/B]([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);
WEAK [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [B]xPortPendSVHandler[/B]([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/LEFT]
WEAK [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [B]xPortSysTickHandler[/B]([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/SIZE]
[SIZE=2][/SIZE]
[SIZE=2]that are defined in port.c.[/SIZE]
[SIZE=2][/SIZE]
[SIZE=2][/SIZE]
[SIZE=2]If you use these in the table instead:[/SIZE]
[SIZE=2][/SIZE]
[SIZE=2][LEFT]vPortSVCHandler, [/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// SVCall handler[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][LEFT]0, [/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// Reserved[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][LEFT]0, [/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// Reserved[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][LEFT]xPortPendSVHandler, [/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// The PendSV handler[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][LEFT]xPortSysTickHandler, [/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// The SysTick handler[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][LEFT]
[/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// [U]Wakeup[/U] sources for the I/O pins:[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][LEFT][/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// PIO0 (0:11)[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// PIO1 (0)
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE]
[SIZE=2][/SIZE]
[SIZE=2]then FreeRTOS runs your tasks.[/SIZE]
[SIZE=2][/SIZE]
[SIZE=2](note I ran it up on a LPC1114 after knocking out the CAN stuff so I don't know if those bits are ok).[/SIZE]
[SIZE=2][/SIZE]



Sorry, I do not quite understand. Should I change vPortSVCHandler on something else?
0 件の賞賛
返信

4,485件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by stalisman on Wed Dec 07 07:37:28 MST 2011
Howdy,

You seem to have a problem with the [B]cr_startup_lpc11.c[/B] file.

It doesn't for example include the functions:

[SIZE=2][LEFT]WEAK [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [B]vPortSVCHandler[/B]([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);
WEAK [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [B]xPortPendSVHandler[/B]([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/LEFT]
WEAK [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [B]xPortSysTickHandler[/B]([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/SIZE]
[SIZE=2][/SIZE]
[SIZE=2]that are defined in port.c.[/SIZE]
[SIZE=2][/SIZE]
[SIZE=2][/SIZE]
[SIZE=2]If you use these in the table instead:[/SIZE]
[SIZE=2][/SIZE]
[SIZE=2][LEFT]vPortSVCHandler, [/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// SVCall handler[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][LEFT]0, [/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// Reserved[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][LEFT]0, [/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// Reserved[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][LEFT]xPortPendSVHandler, [/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// The PendSV handler[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][LEFT]xPortSysTickHandler, [/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// The SysTick handler[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][LEFT]
[/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// [U]Wakeup[/U] sources for the I/O pins:[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][LEFT][/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// PIO0 (0:11)[/LEFT]
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]// PIO1 (0)
[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][/SIZE]
[SIZE=2][/SIZE]
[SIZE=2]then FreeRTOS runs your tasks.[/SIZE]
[SIZE=2][/SIZE]
[SIZE=2](note I ran it up on a LPC1114 after knocking out the CAN stuff so I don't know if those bits are ok).[/SIZE]
[SIZE=2][/SIZE]
0 件の賞賛
返信