Clobbered Data ?
bambino
Posts: 789
I've made a routine in assembly that runs in it's on cog from another object file. I pass it the starting address of some 2700 longs and it fills it with data from a convertor. When it gets done it terminates it'self with a cogstop command.
The app works perfect after being loaded from the IDE, but if I place the Cog in a repeat loop it works one time and after that I get garbage in the buffer I send it. What are some things that could cause my data to be clobbered the second time around. I would think that the cogstop and the next instance of cognew would start my routine with a clean slate, but it's not! Any tricks to starting the cog again or should I longfill the buffer before the second cognew?
Thanks!
The app works perfect after being loaded from the IDE, but if I place the Cog in a repeat loop it works one time and after that I get garbage in the buffer I send it. What are some things that could cause my data to be clobbered the second time around. I would think that the cogstop and the next instance of cognew would start my routine with a clean slate, but it's not! Any tricks to starting the cog again or should I longfill the buffer before the second cognew?
Thanks!
Comments
At the moment I was just looking for some general tips on restarting cogs.
that would be my guess without seeing code
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Need to make your prop design easier or secure? Get a PropMod has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.
I do wish I had been able to bring the code with me this morning, but maybe later!
PS. Don't tell anyone I spent the better part of sunday going over my assembly looking for this error!