Hi, I know we're a little late to the party, but we're trying to run this example code on an LCP18S37 dev kit vrsn3 rev B, but have had no luck.
After running the code the device doesn't enumerate over USB.
Looks like we're running v12.2 of the bootcode:
Here's the code we attempted to use:
#include "board.h"
typedef struct {
volatile uint32_t CTRL;
volatile uint32_t REMAP;
volatile uint32_t CODE_COMP[6];
volatile uint32_t LIT_COMP[2];
} FPB_Type;
#define FPB ((FPB_Type *)0xE0002000)
int main(void)
{
SystemCoreClockUpdate();
Board_Init();
LPC_RGU->RESET_CTRL[0] = 0x387F1200;
LPC_RGU->RESET_CTRL[1] = 0x17FFF7FF;
FPB->REMAP = 0x20000000;
((volatile uint32_t *)0x20000000)[0] = 0x20152015;
FPB->CODE_COMP[0] = 0x10402404 | 0x00000001;
FPB->CTRL = 0x00000003;
LPC_CREG->CREG6 &= ~(1u << 17);
((void(*)(int))0x10402B4D)(LPC_OTP_BASE);
((void(*)(int))0x10402D43)(LPC_OTP_BASE);
((void(*)(int))0x10405563)(LPC_OTP_BASE);
((void(*)(int))0x10405577)(LPC_OTP_BASE);
while(1);
}
Have you got any suggestions for us?
Kinds regards,
Mark
((volatile uint32_t *)0x20000000)[0] = 0x20162016; /* movs r0,#0x16 (2x) */ |