Quantcast
Channel: MSP430 Technical Forums
Viewing all articles
Browse latest Browse all 2077

Adding CC430 support

$
0
0

Hi everyone,

 

I'm working on Energia CC430 support. It's the first time I do this kind of work, it allowed me to understand a lot of things but not everything of course :) So I have a lot of questions !

 

So for now where I am : I'm working on a eZ430 - Chronos 433 mhz (==> CC430F6137). I program it with the ez430 USB stick (I will see later for upload using radio BSL). 

 

For now I just tried to get something working, I made a pin_energia.h creating a new MSP430 variant. I edited the board.h and I had to modify wiring.c to get the clock system working  :

 

Original line 168 :

 

#if defined(__MSP430_HAS_UCS__)

 

Modified to :

 

#if defined(__MSP430_HAS_UCS__) || defined(__MSP430_HAS_UCS_RF__)

 

I used some function from the eZChronos firmware provided by TI to test if the system was running, here is the code : 

https://github.com/battosai30/CC430_EnergiaSupport/blob/master/Test/Heart.cpp

 

Upload using Energia integrated in CCS v6 ==> IT WORKS :) the heart on the LCD is beating !

 

Now I am trying to understand if my modification of wiring.c is enought, and if other Energia features are OK.

 

All files are here : https://github.com/battosai30/CC430_EnergiaSupport

 

Now my questions :

 

1) What is interesting me the most is the radio core. TI provides some interesting low level libraries I can re-use, but I don't know how to integrate it directly in the core. I plans to work on others features like LCD_B, AES ... I think it would be better to directly integrate it and to do not have to add a library each time.

 

2) I found some defines in msp430's pins_energia.h :

 

#define TWISDA_SET_MODE  (PORT_SELECTION0 | PORT_SELECTION1 /* | INPUT_PULLUP*/) /* do not enable the pull ups for this device */
#define TWISCL_SET_MODE  (PORT_SELECTION0 | PORT_SELECTION1 /* | INPUT_PULLUP*/)
#define DEBUG_UARTRXD_SET_MODE (PORT_SELECTION0 | PORT_SELECTION1 | INPUT)
#define DEBUG_UARTTXD_SET_MODE (PORT_SELECTION0 | PORT_SELECTION1 | OUTPUT)
#define SPISCK_SET_MODE (PORT_SELECTION0 | PORT_SELECTION1)
#define SPIMOSI_SET_MODE (PORT_SELECTION0 | PORT_SELECTION1)
#define SPIMISO_SET_MODE (PORT_SELECTION0 | PORT_SELECTION1)
#define DEBUG_UART_MODULE_OFFSET 0x0

I don't really understand what they mean ...

 

3) How the PMAP is used in Energia ? I found a PMAP maping in fraunchpad pins_energia.h but I did not found where it's used.

 

4) I just need a confirmation : function "const uint8_t digital_pin_to_timer[]" is used to define pins PWM compatible ?

 

5) In wiring.c init() :

 

/* Clear P2.6 and P2.7 bits to default to GPIO */
#ifdef P2SEL2
P2SEL &= ~(BIT6|BIT7);
#endif
Why this lines ?

Thanks !

 


Viewing all articles
Browse latest Browse all 2077

Trending Articles