NuttShell (NSH)nsh> <ESC>[Kup_hardfault: PANIC!!! Hard fault: 40000000up_assert: Assertion failed at file:armv7-m/up_hardfault.c line: 171up_dumpstate: sp: 20000bb0up_dumpstate: IRQ stack:up_dumpstate: base: 20000c00up_dumpstate: size: 00000800up_stackdump: 20000ba0: 20000c00 200016b4 00000400 00000d27 000000ab 20000bd0 20000bd0 00003095up_stackdump: 20000bc0: 00000000 20000bd0 00000bfd 00012d09 00000000 00000c05 00000bc5 20000dd8up_stackdump: 20000be0: 00000003 00000bb1 00000000 2000164c 20000df4 00000003 00000000 000009f1up_dumpstate: sp: 20001698up_dumpstate: User stack:up_dumpstate: base: 200016b4up_dumpstate: size: 00000400up_stackdump: 20001680: 20002390 20000e9c 00000000 000010e0 000010e0 40000200 000010c9 200016b8up_stackdump: 200016a0: 00026948 12345678 00000159 00000000 03000cab 00000000 00000000 00000000up_registerdump: R0: 00000000 00000c80 20002390 20000e9c 20000c00 20000df4 00000003 00000000up_registerdump: R8: 00000000 00000000 00000000 00000000 00000000 20001698 000010e0 000010e0up_registerdump: xPSR: 40000200 PRIMASK: 00000000 CONTROL: 00000000up_registerdump: EXC_RETURN: fffffff9
readline_common(&vtbl.vtbl, buf, buflen)uart_read(FAR struct file *filep, FAR char *buffer, size_t buflen)I have done some test on this. It looks like something wrong in thefunction, orreadline_common(&vtbl.vtbl, buf, buflen)since readline_common actually calls uart_read.uart_read(FAR struct file *filep, FAR char *buffer, size_t buflen)I don't know why LPC54608 crashes since it's the same as LPC54628. Any suggestions on this problem? Thanks!
// #undef BOARD_180MHz
// #define BOARD_220MHz 1
#undef BOARD_220MHz
#define BOARD_180MHz 1static void lpc54_configure_pll(FAR const struct pll_setup_s *pllsetup){
uint32_t regval;
/* Turn on the ext clock if system pll input select clk_in */
regval = getreg32(LPC54_SYSCON_SYSPLLCLKSEL);
if ((regval & SYSCON_SYSPLLCLKSEL_CLKIN) != 0) { putreg32(SYSCON_PDRUNCFG0_VD2ANA, LPC54_SYSCON_PDRUNCFGCLR0); putreg32(SYSCON_PDRUNCFG1_SYSOSC, LPC54_SYSCON_PDRUNCFGCLR1); }
...
...
/* Wait for the lock? */
if ((pllsetup->pllflags & PLL_SETUPFLAG_WAITLOCK) != 0) { while ((getreg32(LPC54_SYSCON_SYSPLLSTAT) & SYSCON_SYSPLLSTAT_LOCK) == 0) <======= stuck here. { } }}
> I don't know if LPC54628 has the same problem if chages the clock to 180MHz.
We will have to answer that question somehow before we can bring the change in.
int main(void){ /* Init board hardware. */ BOARD_InitHardware(); /* Running FRO = 12 MHz*/ BOARD_BootClockVLPR(); /* Init output LED GPIO. */ LED_GREEN_INIT(1); /* Attach Main Clock as CLKOUT */ /* Set the clock dividor to divide by 2*/ /* Intiialize UTICK */ /* Set the UTICK timer to wake up the device from reduced power mode */ /* Enter Deep Sleep mode */ POWER_EnterDeepSleep(SYSCON_PDRUNCFG_PDEN_SRAM0_MASK | SYSCON_PDRUNCFG_PDEN_SRAMX_MASK | SYSCON_PDRUNCFG_PDEN_WDT_OSC_MASK); /* Set the clock dividor to divide by 1*/ while (1) { /* Toggle LED */ LED_GREEN_TOGGLE(); delay(); }}