ΣSigmaStudio Ask AI Русский Log in

divide by zero?

SigmaDSP & SigmaStudio ptd Nov 22, 2011 00:00 5 replies Original on forum ↗
Subscribe
ptd Question
Nov 22, 2011 00:00

ADAU1702

Am using division function. I guard against division by zero using a constant and AB compare. This works fine when I download from the computer, but am pretty sure I'm getting a divide by zero loading from flash. What is the appropriate technique to prevent divide by zero?

Audio Signal Processors

adau1702

SigmaDSP Audio Processors

ADIApproved Reply
Dec 13, 2011 00:00

HI:

The technique you are using should work for all cases. In reality there shoudn't be a difference between controlling the DSP from SigmaStudio or when it self boots.

Perhaps I'm not understanding the problem you are running at, can you please explain it further.

best regards

Miguel

ptd Reply
Dec 15, 2011 00:00

Thanks, Miguel. The key phrase is "shouldn't be a difference." Briefly, I had two audio channels with control involving division. Both worked perfectly when loaded from sigma Studio. One of the two didn't work with self-boot. This symptom continued through various program rearrangements. I could reliably fix it by removing the division function. Sigma/self boot seemed identical. Changing processor and Flash didn't help at all. I reconfigured program for just one division for both channels. Both worked from Sigma Studio, but neither did from self-boot. I added stuff (separate from audio code) to configure and test a table method to estimate 1/x. Both channels began to work, even though I hadn't touched that portion of things. I left the extraneous stuff because it made it work, but this is hardly a satisfying answer. There is some difference, but what? --Phil

ADIApproved Reply
Dec 15, 2011 00:00

Hi Phil

I agree that we should get to the bottom of this. It seems like some coefficient that is downloaded with SigmaStudio is different or not included in the generated self Boot file. I can think of one way to troubleshoot this problem; download the SigmaStudio code into the EEPROM and then selfboot using one of our eval boards and then use SigmaStudio to read the content in memory; by doing a simple AB comparison between the data coming from SigmaStudio and what's in memory we can pinpoint what the difference is. If you would want us to troubleshoot this please send us your schematic or perhaps show us a way to replicate this behavior.

Let me know your thoughts.

Miguel

ptd Reply
Dec 19, 2011 00:00

Thanks, Miguel. I'll send you a schematic. I want to be certain it is a schematic that fails in the way I described, so I need a little available time, a commodity in short supply at this very moment. It will probably be after Christmas.--Phil

EZAdministrator Reply
Aug 2, 2018 00:00

This question has been assumed as answered either offline via email or with a multi-part answer. This question has now been closed out. If you have an inquiry related to this topic please post a new question in the applicable product forum.

Thank you,
EZ Admin