Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : Strange Case: WakeUp on MX470.64pin
Author | Message | ||||
sagt3k Guru Joined: 01/02/2015 Location: ItalyPosts: 313 |
Hi to everybody I am using PIC32MX.64pin with firmware 05.03.02. I use pin(51) to simulate wakeup action etc. If the micro is NOT connected to USB and I do "cpu sleep" after I can use Pin(51), the micro answer correctly and continues to run. While if I connect micro with USB makes some strange behavior. Sometimes "cpu sleep" It has no effect does not go into sleep. Some time after giving the command "cpu sleep" even if I use the pin (51) does not wake up again and I have to do a reset. what's the problem ? where am wrong Thanks sagt3k |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3167 |
You will have trouble if you have an active USB connection and use sleep. This is something I should have mentioned in the documentation. Sleep is all about saving power in a battery powered application so in a practical situation it should not matter because there is little reason to send the Micromite to sleep if you have an active USB connection. Geoff Geoff Graham - http://geoffg.net |
||||
sagt3k Guru Joined: 01/02/2015 Location: ItalyPosts: 313 |
Hi Geoff OK Clear, but is it possible to have a variable MM.USB=1 that indicates a USB console connection? Or is it possibile to have no action with "cpu sleep" when is actvie USB connection? Thanks sagt3k |
||||
CircuitGizmos Guru Joined: 08/09/2011 Location: United StatesPosts: 1421 |
I like that. Seconded. Micromites and Maximites! - Beginning Maximite |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8608 |
? peek(word &HBF885060) and 1 will tell you if the USB is plugged in 1=yes 0=no |
||||
sagt3k Guru Joined: 01/02/2015 Location: ItalyPosts: 313 |
Hi matherp I tried with USB console and give me 1 and later with UART on TX/RX as console ... same result=1. Where is the error? I'm trying on PIC32MX470H.64pin with MMbasic "5.0302". Thanks sagt3k |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8608 |
This is showing power to the VBUS pin-34 (on 64-pin). If you have power on that pin USB is enabled whether you want it or not |
||||
sagt3k Guru Joined: 01/02/2015 Location: ItalyPosts: 313 |
Hi matherp Thanks solved. But I don't know very well PIC32MX/MZ with various pin. But this address(&HBF885060) is equal on all PIC32xx ? Or Can you think to implement MM.USB ? Thanks sagt3k |
||||
sagt3k Guru Joined: 01/02/2015 Location: ItalyPosts: 313 |
Hi matherp Concerning PIC32MZ2048EFH 64pin, What is the address to read if connected with USB or no? Thanks sagt3k |
||||
Print this page |