This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Switching from 5V to 5V-USB



Hi!

Can somebody tell me what happens when I switch from 5V to 5V-USB while the program is running. I have the program in flash and normally I use the 5V supply. When something works wrong, I've observed that if I switch to the 5V-USB the execution seems to be stopped. So far, this was good enough. Nothing connected at the PWM output, nothing to get fried. But as the PWM outputs remain in an undefined state, this practice is no longer ok when I connect something. I've implemeted TZ6 to put the PWMs in low, but the problem is that sometimes I lose the connection with the target, so halting doesn't help me put the PWMs in low. Can I use the supply switch to give a TZ condition. Is there maybe a clock failure when I change the supply source?

I've implemented TZ1 to do this job, but the current setup doesn't give me access to GPIO12, the power switch would be a perfect temporary solution.

Thanks,

monica

 

  • Hey Monica,

    The diagram for the power switch for your particular configuration (eZdsp, Delfino, etc.) can be found in the technical reference.

    I believe the reason that execution is stopping is because the switch is not instantaneous - even if both sides are supplied with 5V, there is a moment when the switch's lead isn't touching either one, so there is no power connected to it.

    Essentially, the reason that execution stops is because you're cutting off all power to your dsp.  In my opinion, this is terrible for the processor and may lead to malfunctions if it throws a bit incorrectly when the power is cut, but you may want to ask an expert about the ramifications of cutting the power.

    A method that I use of stopping the DSP is to have a GPIO port run asm("ESTOP"); if voltage is supplied to it.  This assembler command stops your processor, after which you can disconnect it.

    Cheers,

    Erich

  • Thanks Erich!

    That's clear I cut the power when I switch. But I was wondering if I get also a CLOCKFAIL signal to use it to put the outputs in low. Or this is too fast and the power is down before TZ interrupt can be executed.

    I have also a method using a GPIO port, but to use it I must change the layout and the mechanical  setup - version1 is always better than version0  :)

    monica