SmartRF Studio settings
Tuesday, January 24th, 2006I am using SmartRF Studio to generate register settings for the CC2500, which is no doubt true for anyone using these parts.
The code export function is cool. If you use it, be sure to save your configuration in addition to exporting code. I left out that step and had to re-configure the registers, although it wasn’t a big deal since I’m still using mostly defaults.
I set up the export code section to do the following:
- C-style comment delimiters
- normal view summary
- header:
const unsigned char cc2500_reg[][2] =
{
- for each register:
{ 0x@AH@, 0x@VH@ }@,@ // @RN@: @Rd@
- footer:
};
const unsigned int cc2500_reg_size = sizeof(cc2500_reg);
This gives a nice listing and is easily included into a build. I also use a header file with the following:
extern const unsigned char cc2500_reg[][2];
extern const unsigned int cc2500_reg_size;
Nothing too fancy, but it seems to work well. I set up my SPI tx routine to take a character pointer and a length, so sending the configuration is really easy and takes no effort aside from updating the settings in SmartRF Studio and exporting them to the C file.