update SCT_MATCH / MATCH_RELOAD register cause hardfault?

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

update SCT_MATCH / MATCH_RELOAD register cause hardfault?

292 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by camellias on Sat Nov 01 00:54:57 MST 2014
Hi, guys, it's so weird that the program will drop into the hardfault routine everytime those registers was updated.
my operation flow:

sct running...
halt the sct: LPC_SCT->CTRL_U |= (SCT_CTRL_HALT_L | SCT_CTRL_HALT_H) ; 
update the match / match reload registers: LPC_SCT->MATCHREL[0].U = my_reload_value;   //here is the problem


so, anyone got the same problem here?
Labels (1)
0 Kudos
4 Replies

269 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Fri Nov 07 06:47:55 MST 2014
Hi baba11,
You can also use PLL calculator from
http://www.lpcware.com/content/nxpfile/lpc8xx-clock-and-pll-configuration-tool
0 Kudos

269 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by baba11 on Fri Nov 07 04:39:32 MST 2014
It appears that the frequency conversion functionality of the PLL is not described in the datasheet or manual for LPC82x. In the above tool there is a diagram showing the functions inside the PLL. This is very useful and essential information in order to understand that
0 Kudos

269 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by camellias on Mon Nov 03 23:54:14 MST 2014
Hi,MC:
     It's a disaligned memory accessing causing this hardfault, thank you anyway
0 Kudos

269 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Sun Nov 02 08:23:00 MST 2014
Hi camellias,
Which code base are you using? Are you using LPCopen?
Did you check examples from
http://www.nxp.com/documents/application_note/AN11538.zip?
0 Kudos