Jump to content
Sign in to follow this  
danutz

% And / Operators Problem

Recommended Posts

I use the % operator in both interrupt and main code, and get this warning:

Serious Warning: Possible sw stack corruption, function '__rem_16_16' called by more than one asynchronous thread (main/Task, interrupt, interrupt low)

The same problem when dividing to a number that's not power of 2.

 

Could the compiler create different functions for interrupt and main code? (let's say __rem_16_16_int would be called when using % inside an interrupt and __rem_16_16 when using % in the main code).

 

BoostC, SourceBoost 6.70, 18F2620.

 

Thank you,

Dan

Edited by danutz

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...