Part Number: CC2530
Other Parts Discussed in Thread: Z-STACK,
My question is in relation to a CC2530 in a low power application using Z-stack home 1.2.2a. I'm using serial UART with the CC2530 ZNP, and this won't interrupt the device from low power PM2 and PM3 mode, only SPI is supported. I know I could possibly program an interrupt, but I don't have software experience so I thought one option would be use a mosfet as a switch to power off the radio.
I have used a P-channel mosfet to switch the active to the CC2530 in a prototype and put a 10K resistor in parallel to discharge the capacitors when the mosfet is switched off. My circuit and software function fine, but I was wondering if there is any general advice you can give me about what I should be wary about when using this circuit. Should I put the RESET pin low prior to cutting power? I have attached a basic schematic of my mosfet circuit.
Alternatively if I could receive help with programming an interrupt that would be good because it will require less materials. I have previously programmed an interrupt for another project using the samplelight example, but there were already easy to follow examples.
The z-stack znp project has the same Hal_key.c file which I know how to program an interrupt, but I'm not sure where to call the interrupt to wake and sleep the device? I'm using the standard ZNP Z-stack home 1.2.2a which has P0_1 and P2_0 (joystick) as interrupts but I can't see any calls to the interrupts and grounding these pins does not trigger an interrupt.
Example:
if ( (keys & HAL_KEY_SW_1))
{
Wake up and go to active mode and send messages
}
if ( (keys & HAL_KEY_SW_2))
{
Go back to sleep
}
In summary
- I'm using the CC2530 ZNP in Z-stack home 1.2.2a with UART;
- I would like enter deep sleep PM3 and have a interrupt pin configured as a input key to wake the device, send messages, then go back to sleep.
Thanks for your time.
Regards
Quinn
