Hello,
I create a shall command to display the FMT register values:
...................
uint32_t reg;
FTM_MemMapPtr ftm = FTM0_BASE_PTR;
reg = ftm->SC;
printf ("\nSC: %08X \n", reg);
reg = ftm->MODE;
printf ("\nMODE: %08X \n", reg);
reg = ftm->MOD;
printf ("\nMOD: %08X \n", reg);
reg = ftm->CONTROLS[1].CnV;
printf ("\nC1V: %08X \n", reg);
reg = ftm->CONTROLS[1].CnSC;
printf ("\nC1SC: %08X \n", reg);
ftm2->MOD = 290;
printf ("\nMOD: %08X \n", reg);
reg = ftm->MOD;
printf ("\nMOD: %08X \n", reg);
...........................................
But the code will crash when read the first register.
Does the MQX use the MPU to protect the memory access, so cause the OS crashes? How can I access the device registers. I am using the MQX4.2 and run the example in a TWR-K60D100 system.