MC13224V and Beekit 1.9.11 - Errors and Bugs

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MC13224V and Beekit 1.9.11 - Errors and Bugs

2,384件の閲覧回数
sharning
Contributor I

I have started developing some applications using Beekit and the MC13224 and have noticed the following "issues" others may wish to comment on:

 

1) numerous errors in MC1322X ref manual rev 1.4. E.g. Gpio_GetPortData() listed as having 3 parameters, actually has only 2. (no bitmask).

2) Bug in TrancieverPowerManagement.c function MLMESetWakeupSource(). this function calls CRM_WuCntl() with uninitialised parameter WuCtrl.TIMER_WU_TIMEOUT, causing undefined wakeup timer timeout values. This function either needs have another parameter or the CRM_WuCntrl ROM call needs to be fixed.

3) MLMERadioInit In TrancieverConfigMngmnt.c calls RadioInit(). RadioInit does far more than one expects and is undocumented yet mandatory to use Beekit. it corrupts the Ring oscillator calibration values, and always sets the Buck regulator into "Bypass" mode. In a real application waking up from hibernation, this means an un-necessary spike in power drain for 40uS.

 

Freescale, if you are not going to supply the source code, at least document what these functions really do!. It also helps us in working out what order to initialize things.

Do any other developers have any other issues worth reporting?

Dean.

タグ(1)
0 件の賞賛
返信
5 返答(返信)

953件の閲覧回数
redbee
Contributor III

I've worked through most of RadioInit; you can find code linked at the bottom. I know it's not "documentation" but at least you can see what's going on.

 

I've found a lot of little bugs and incosistencies. You can skim through my code in the mc1322x-tests and see --- I've added a comment whenever I've come across something strange. There is some stuff in the uart and sleep modes that didn't seem to behave as documented.

 

See http://mc1322x.devl.org

 

-Mar.
0 件の賞賛
返信

953件の閲覧回数
sharning
Contributor I

Thanks Mariano, well done on your development. RadioInit is probably my biggest annoyance as it has a detremental effect on power consumption when waking up from hibernation. I had traced and dissassembled RadioInit which seems to be linked in from the zigbee library, and which called ROM code. I assume many errors have crept through when they migrated from 2.0 to 2.1 rom. I have started to look at your maca.c and I am present trying to use your skeleton code and call the existing ROM routines such as SMAC_InitFlybackSettings, InitRifModuleVars etc. I assume you may have already done this in arriving at your working code! It certainly is frustrating trying to understand code that writes dozens of number into undocumented registers. I just wish they listed source to such functions, or at least properly documented their behavior. Also It would be worthwhile for Freescale to have its own forum area for Zigbee stuff too.

Ragards,

Dean.

0 件の賞賛
返信

953件の閲覧回数
redbee
Contributor III

sharning wrote:

Thanks Mariano, well done on your development. RadioInit is probably my biggest annoyance as it has a detremental effect on power consumption when waking up from hibernation.


Yes, that makes sense. Check out my radio_off and radio_on functions in my Contiki tree:

 

contiki-mc1322x.git/cpu/mc1322x/maca.c

 

You shouldn't have to re-call radioinit when waking up --- just the radio_on function and maybe init_phy... I think setting the buck to "bypass" mode is necessary unless you are using the buck. If I remember correctly, there is a test in the freescale radio_init that will set that mode one way or the other. I'm pretty sure I skipped over that.

 


 sharning wrote:

I had traced and dissassembled RadioInit which seems to be linked in from the zigbee library, and which called ROM code. I assume many errors have crept through when they migrated from 2.0 to 2.1 rom. I have started to look at your maca.c and I am present trying to use your skeleton code and call the existing ROM routines such as SMAC_InitFlybackSettings, InitRifModuleVars etc. I assume you may have already done this in arriving at your working code!


 

Yes, that was my basic process --- one at a time I replaced the beekit routines with my own until I replaced all the necessary ones. It's based off the SMAC weather station example. This project, open-mc13224v, has been working from a different set which works differently (it may use the ROM more). My code (and as far as I know, the SMAC code too) only uses the ROM to read the calibration data out of the last NVM page.

 


 sharning wrote:

It certainly is frustrating trying to understand code that writes dozens of number into undocumented registers. I just wish they listed source to such functions, or at least properly documented their behavior.



yeah, it was a total bummer at first. With that said, I think a lot of those registers are tuning parameters of the radio. And the data in the NVM is cal. data specific for each chip --- so they probably decided that documenting these registers wouldn't be that useful since you'd need intimate knowledge of the chip to set the values properly anyway. Now I'm not trying to make excuses --- I would be nice to know what those registers do --- but at the same time the docs would probably read something like "this sets the preamp bias current --- program the value to this magic number or it won't work". And in the case of the flyback I'd bet that the wrong values could damage the chip, but I'm just guessing now. 
 
Anyway, good luck. I hope you get some answers from Freescale too! 
 
-Mar.
 
0 件の賞賛
返信

953件の閲覧回数
sharning
Contributor I

Thanks Mariano, I started off with the low power doorbell TX, and right away saw that the program has a bug that totally ignored the "ACK" message from the RX unit. I am using the buck regulator, but without 100uH and just a small 47uH inductor. At 1MHz, 100uH was over the top and 47 has less than 2% loss if that. I will try your suggestions from hibernation resume and see what happens. I also wrote a small self calibration for the ring oscillator, but just tweaked the trim capicatance up till it came as close as possible to 2KHz. I recall from InitRadio() it runs with minimum C at about 20 or 40 KHz!. The ICS seem to work really well set to +4.5dBm and the NCD "Demulator". What does C to V and FlyBack Init actually do? I assume they are for the RF tracking oscillator?

Dean.

0 件の賞賛
返信

953件の閲覧回数
redbee
Contributor III

The buck is something I've been meaning to get to... I'll checkout you hint about the inductor.

 

I too noticed that the ring osc. was way off --- I didn't realized it was due to the radio init. Thanks! I performed the cal. routine in the reference manual.  See cal_ring_osc in  http://git.devl.org/?p=malvira/contiki-mc1322x.git;a=blob;f=cpu/mc1322x/crm.c

 

I don't know what ctov actually does. I know the RF performance is terrible without it. Flyback init is also a mystery.

 

Trimming the main ref. oscialltor seems to be essential to good performace. (main osc. tuning)

 

0 件の賞賛
返信