Quote:
|
Originally Posted by jgannon
I'm working on some code that requires processing data more frequently than every 26.2ms. In driver-controlled mode, this is not a problem, because I can use Process_Data_From_Local_IO(). However, the autonomous function waits for statusflag.NEW_SPI_DATA before every loop. Is there any reason that I can't put a call to Process_Data_From_Local_IO() outside of that if statement? I can't imagine why it wouldn't work, but I want to make sure that it's not going to do bad things if I do.
|
Actually, the call to Process_Data_From_Local_IO()
IS outside of the if statement. And there is no waiting going on. The main loop simply checks the statusflag.NEW_SPI_DATA flag to see if new data is available from the master microprocessor. (It only reads memory. I doesn't make a function call.) If there is data available, it is processed, and then regardless of whether there was NEW_SPI_DATA available, it calls Process_Data_From_Local_IO.
[edit]
Sorry. I missed that you were talking about autonomous mode. I'll get back to you on that (if someone else doesn't beat me to it.)
[/edit]