I loaded my firmware into a unit, and had a few bugs but I can't figure out one of them. When my unit loads, it initializes the GPIO being used as just IO, Then a DAC, which loads fine, then a SPI controlled ADC. This worked perfectly in my last version of my software so I never touched the code, but right after my DSPIInit function, as it begins to send a dummy read command to the ADC (mfgr spec) the task monitor (I believe) splashes the screen with "SizeLeft: 0" or "SizeLeft: 2" - not sure what this means - Screenshot attached. I should note that I originally had code that loaded values from user flash prior to loading the peripherals. I have since removed this line of code. I also attached a few screenshots of the code, sorry, not allowed to show any more of it... And sorry if it's squashed a little, had to cut out a few comments to get it all on the page.
So, can someone enlighten me on this? Thanks for all the help!!!
MOD54415 Task Monitor SizeLeft = ?
-
- Posts: 192
- Joined: Mon Dec 17, 2012 6:24 am
MOD54415 Task Monitor SizeLeft = ?
- Attachments
-
- This is the init function for the ADC.
- ADC_load.jpg (338.74 KiB) Viewed 9161 times
-
- Section of User_Main() that calls the class functions and shows the commented out load function for the user flash area.
- usermain.jpg (348.21 KiB) Viewed 9161 times
-
- MTTTY output
- SizeLeft.jpg (216.45 KiB) Viewed 9161 times
Re: MOD54415 Task Monitor SizeLeft = ?
It is unlikely that the "SizeLeft" output is coming from TaskMonitor; that code is only invoked by the TaskScan utility when you run it from the NBEclipse IDE.
It is more likely that there is a printf() statement somewhere in your code that is outputting "SizeLeft". You should do a file search for that statement.
I see that you are running NBEclipse Release 2.6.9 which was unstable and pulled by the NB development team. As a first step, I would try rolling back to 2.6.8 or 2.6.7 .If it works in those releases then you might try 2.7.0, although that is a beta release.
Ed
It is more likely that there is a printf() statement somewhere in your code that is outputting "SizeLeft". You should do a file search for that statement.
I see that you are running NBEclipse Release 2.6.9 which was unstable and pulled by the NB development team. As a first step, I would try rolling back to 2.6.8 or 2.6.7 .If it works in those releases then you might try 2.7.0, although that is a beta release.
Ed
-
- Posts: 192
- Joined: Mon Dec 17, 2012 6:24 am
Re: MOD54415 Task Monitor SizeLeft = ?
Thanks Ed,
I'm don't fully understand TaskScan enough to understand how to interpret what I see. I can tell you this though, this is occurring in one of my startup functions. This function hasn't changed since Rev3 of my software and has always worked. I only just recently added iprintf statements when I noticed that my system was locking up at startup. I sometimes do that in lieu of running the debugger so that I don't have to disable any of my timers or the cwt (Still learning a bit...). None the less, my iprintf statements end before the main while loop. None of my iprintf statements are outputting "SizeLeft". This output is occurring in a loop that has no iprintf statement. It is the 16 count loop under the "ADC_Setup()" function.
This is the loop:
Also, I did not run the debugger if that's what you're referring to. I'll try loading it through "AutoUpdate" to see if that makes a difference.
2.6.9 was pulled? I Was unaware. I was told it was released to fix the SPI bug (among a few others) from 2.6.8. This code ran perfectly on 2.6.5, I will attempt 2.7.0.
I'm don't fully understand TaskScan enough to understand how to interpret what I see. I can tell you this though, this is occurring in one of my startup functions. This function hasn't changed since Rev3 of my software and has always worked. I only just recently added iprintf statements when I noticed that my system was locking up at startup. I sometimes do that in lieu of running the debugger so that I don't have to disable any of my timers or the cwt (Still learning a bit...). None the less, my iprintf statements end before the main while loop. None of my iprintf statements are outputting "SizeLeft". This output is occurring in a loop that has no iprintf statement. It is the 16 count loop under the "ADC_Setup()" function.
This is the loop:
Code: Select all
for (int i = 0; i < 16; i++)
{
DSPIStart(3, TXBuff, RXBuff, 2, NULL, true);
while(!DSPIdone(3));
receive[i] = ((RXBuff[0] << 8) | RXBuff[1]);
}
2.6.9 was pulled? I Was unaware. I was told it was released to fix the SPI bug (among a few others) from 2.6.8. This code ran perfectly on 2.6.5, I will attempt 2.7.0.
-
- Posts: 192
- Joined: Mon Dec 17, 2012 6:24 am
Re: MOD54415 Task Monitor SizeLeft = ?
Hey Ed and everyone else that has read this post:
Ed was right, NNDK 2.6.9 was the issue. I rolled back to 2.6.7 to be safe, and all the problems went away - everything is working as designed. Thanks for the info, Ed!
Ed was right, NNDK 2.6.9 was the issue. I rolled back to 2.6.7 to be safe, and all the problems went away - everything is working as designed. Thanks for the info, Ed!
Re: MOD54415 Task Monitor SizeLeft = ?
it looks like there are a couple of iprintf statements that got left in dspi.cpp at some point. I commented them out in mine and rebuilt system files, no more problem.
-
- Posts: 192
- Joined: Mon Dec 17, 2012 6:24 am
Re: MOD54415 Task Monitor SizeLeft = ?
That wasn't my only issue - it would freeze up at random points too and I'd get the TaskScan message in MTTTY just before it would reboot itself. But the freeze point became a bit sporatic - so it never froze in the same place all the time...