Blockly, multi-start and SPE035 block

TerryRy

Member
Hi everyone

I have been trying to get a multi start Blockly program to compile but get an error.

To test out the problem I have the very simple test program attached. I have found that a SPE035 block automatically inserts a Setfreq M8 before and a Setfreq Mdefault after the Serout command sent to the SPE035. Setfreq is not allowed for multi start programs and I suspect the cause of the problem. Other serial out blocks do not cause the same problem.

I there a work around for this as I would like use multi start and SPE035 together.

cheers

Error msg.jpg
 

Technical

Technical Support
Staff member
You have correctly identified the issue but there is no easy work around, not even in BASIC.

SPE035 requires the chip to run twice as fast (to get to the SPE035 baud rate). Multi tasking controls the run speed internally (in order to run multiple tasks in parallel) and so doesn't allow setfreq commands.

You will probably need to refactor into a single task program.
 

TerryRy

Member
Thanks technical. I have already restructured the program to avoid multi-start (a bit more messy). Would it be possible to run the whole program at M8 and adjust pause command timings accordingly (I don't have any other serial comms)?

It's a trap that a some enthusiastic SPE035 users might fall into as there is no mention of the limitation in the Blockly manual.

Thanks for your confirmation of the issue.
 

Technical

Technical Support
Staff member
You could add your own setfreq command in blockly, but would have to reissue it again after the spe035 commands as they will drop back to the default.

We've logged a ticket to add a more specific error message to Blockly in this type of scenario.
 
Top