questions on MSP430 CPU-specific code

Hello everyone,

I have two questions concerning the handling of MSP 430 CPUs in RIOT's kernel:

a) there is a definition of the MCU main frequency ('F_CPU' macro) in the 'cpu/msp430-common/include/cpu.h' file... That seems quite strange, since that frequency is probably different from a model to another (e.g. F1611, F2617, CC6137...), possibly even from a board to another. Maybe should it instead be defined in 'board.h' files?

b) I couldn't find where LPM functions (those defined in 'core/include/lpm.h') are implemented for MSP430 MCUs. Is it still a work to do?

Best regards,

That is the definition :wink: But I've migrated this to stub implementation in https://github.com/RIOT-OS/RIOT/pull/446

Cheers, Ludwig

Sorry, I misread: The definition is in cpu/msp430-common/include/cpu.h: #define lpm_set(...)

Hi.

Seen your 'lpm_cpu.c' file: I've turned it into a basic (but functional) implementation; also moved the CPU frequency definitions to 'board.h' files (instead of the common 'cpu.h')   -> pull request #459 on main RIOT Github repo.

HTH

Le 19/12/2013 12:25, Ludwig Ortmann a �crit :