Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 5 months ago.
MMA8451Q example code not working after export to uVision 5.12
I've been able to build this example directly on mbed.org and successfully run the application on a Freedom K20D50M board. However when I export the code to for uVision I run into some trouble. The code compiles fine and can be loaded to the board, but the accelerometer doesn't seem to be read correctly. It always returns values of x=.3 y=0, z=0. Is there possibly init code or a compiler switch missing from the export? Has anyone else tried this?
- Toolchain info:
IDE-Version: µVision V5.12.0.0
Tool Version Numbers: Toolchain: MDK-ARM Professional: 100 user(s) Version: 5.12.0.0 Toolchain Path: C:\Keil_v5\ARM\ARMCC\Bin C Compiler: Armcc.exe V5.05 (build 41) Assembler: Armasm.exe V5.05 (build 41) Linker/Locator: ArmLink.exe V5.05 (build 41) Library Manager: ArmAr.exe V5.05 (build 41) Hex Converter: FromElf.exe V5.05 (build 41) CPU DLL: SARMCM3.DLL V5.12.0.0 Dialog DLL: DCM.DLL V1.13.0.0 Target DLL: CMSIS_AGDI.dll V1.19.0.0 Dialog DLL: TCM.DLL V1.14.2.0 - Project file /media/uploads/boldreceiver/frdm_mma8451q.uvprojx
The only one which comes to my mind, that exported project has by default set optimization to 0, in the online IDE is set to 3 as I recall.
posted by Martin Kojtal 01 Dec 2014