snickels wrote:I was trying it through the CodeWarrior debugger last night and the debugger kept dying in main() at the call to UseExternalClock(). I restart and manually step into that function and the BDM looses communication when the ICGC1 is written. The full datasheet shows a 16MHz crystal, so it shouldn't have a problem. Anyone else seeing this?
Hi Paramasivan.
In my own experience I've never used fullchip simulation because it it important to test the code with the hardware.
However, there is a section in this example (Wireless UART) where the external clock is used (PIN 13 & 14), this will cause the lose of the control of your application, just consider it and do not get surprised.
In the PAN4555 there are some pins but the munber 13 and 14 MUST be attached together.
Check also the recomendations placed by snickels referring to the change of some parameters in the code.
Anyway if you need more help this is the better way to get responses.
Marquinho
Follow this.....
Access Freescale BeeKit
File-New project
In SMAC select.................. Wireless UART(fill options at the bottom of this window) (Ok)
At the wizard press (Target Board MC1321x-NCB (Next)
At Select the hardware Select MC13192-SARD (Finish)
At the Top Menu....
Solution-Export Solution (ok at the new window)
Quit BeeKit
Go to Code warrior
File-Import Project.... Select the project you did before..... and give a name to your CW project
At this point you did the CW project.....
Click at :smileyplus: on Wireless UART folder - sources ..... "wireless-uart.c" this is the code....
Open the MC1321XSRB.c located at Shared-Drivers folders
Change RadioInit to.....
void RadioInit(void) {
SPIDrvWrite(0x11,0x80FF); /* Eliminate Unlock Conditions due to L01 */
SPIDrvWrite(0x1B,0x8000); /* Disable TC1. */
SPIDrvWrite(0x1D,0x8000); /* Disable TC2. */
SPIDrvWrite(0x1F,0x8000); /* Disable TC3. */
SPIDrvWrite(0x21,0x8000); /* Disable TC4. */
SPIDrvWrite(0x07,0x5C00); /* Enable CLKo in Doze */
SPIDrvWrite(0x0C,0x0381); /* IRQ pull-up disable. Vdd for RF switch is set*/
SPIDrvWrite(0x04,0xA08D); /* New cal value */
SPIDrvWrite(0x05,0x8351); /* Acoma, TC1, Doze, ATTN masks, LO1, CRC */
SPIDrvWrite(0x06,0x4720); /* CCA, TX, RX, energy detect */
SPIDrvWrite(0x0B,0xC0FE); /* IRQ pull-up disable. Vdd for RF switch is set*/
(void)SPIDrvRead(0x25);
/* Advance the state variable to Idle */
gu8RTxMode = IDLE_MODE;
}
At this point you should program two devices with the same code this process will enable the radio, but the serial port must be attached to some circuitery to get RS232 levels, if you do not have this circuitery you would not be able to send information between this two devices.
Regards
Marco