dwt_configuresleep(DWT_LOADUCODE | DWT_PRESRV_SLEEP | DWT_LOADOPSET | DWT_CONFIG , DWT_WAKE_CS | DWT_WAKE_WK |DWT_SLP_EN);dwt_entersleep();
Joe forwarded your issue to me.
Not sure if I could of that much help right now.
I take it the IC is correctly initialized , LDE loaded etc..
But to be sure , could I ask you to or could you confirm.
A) study the SPI section of the Datasheet, if not already done (5.8 Host Controller Interface). The DS has just been updated, so I send you the latest.
B) that In case you’re loading the UCODE you also need to wait about let’s say 120 micro seconds before changing clocks back before increasing the SPI frequency (See chapter 2.4 Power on Reset) of the IC usermanual
What could/will also be of a help is the fact that we released an API with example code.
This API contains a couple of standalone examples like , just RX or TX, RX or TX with sleep and auto-sleep , Continuous Wave and Frame mode and some more.
These examples could be an aid for your own HW / SW development and could also be used to help to determine if an issue is HW or SW .
This new code is attached. Just change .zop into .zip.
Mik, I hope this is some help
The main change to fix it was increasing the time from wakeup to any SPI activity.
I am David Carkeek's colleague working on a prototype that uses the DWM1000 module. I have a technical issue that is puzzling me, and I wondered if you could shed some light on it for me.
On a couple of occasions, following a crash of my software (not your demo), I have apparently unset the wakeup flags: DWT_WAKE_CS and DWT_WAKE_WK just before sending the chip to sleep. In that mode the chip won't wake up on CS, or WAKE of course.
I understood from the manual that grounding the RSTn line should reset the chip, and enable my program to regain control and talk over the SPI again. To test that theory I have manually jumpered RSTn to ground momentarily, but I still can't talk to it over SPI and so I can't reset those wakeup flags. Indeed the only thing that seems to work is to power everything off completely, and restart. Then, fortunately I regain control again.
Grounding RTSn does appear to reset the DW chip. I say that because when the wakeup flags are set correctly and everything is running correctly, grounding that pin makes the DW inaccessible for a short while, and then my software recovers, after the reset finishes I assume.
I want to bulletproof my code against this happening, and I wondered what the magic formula for waking up a deep-sleeping DW chip is.
I wonder what it is that I'm not understanding, and if you or your colleagues could explain what I'm doing wrong.
On Tue, Mar 10, 2015 at 3:19 AM, Joe Byrne< firstname.lastname@example.org> wrote:
Good morning David,
I am currently updating our latest Salesforce documents for our costumer base. I would just like to confirm your address as
19339 Harleigh Drive
Saratoga, CA 95070
Phone No : ?
I would also like to add a note ( if you wish ) regarding your project ,your progress to date and anything else you might
think would be helpful to you.
Thanks David .