Difference between revisions of "Pf sc diag"

From DIDEAS Wiki
Jump to: navigation, search
m
 
m
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
+
delete
* One primary thread at processor ISR level 0 (eg lowest priority thread)
 
* At least two ISRs that operate the DMA that move data for the SPI and UARTs
 
* Tick timer ISR.  Believe all it does effectivle is say tic.  Don't believe does any actual work.
 
 
 
==init (ap_main.c)==
 
* hardware init
 
* various software init
 
==main loop (ap_main.c) ==
 
This is the primary thread what does ALL the work.  Although it appears to have only 2 functions : through nicelty obuscated coding, other functions get called.
 
 
 
At the next highest level we can say following actions are done in the main loop:
 
* execute_cmd_rsp  (see last page of ap_main.)
 
** FUP = field update port, this is the ASYNC serial port interface to the outside world
 
** difficult to explain as functions convoluted and are misnamed .  However over all this code block deals with the MPD command / response protocol. 
 
***Gets 'messages' from buffers (either locally or from the FUP),
 
*** Routes /forwards messages to MC/IMU,
 
*** Processes message locally (command execution).  MAJOR problem w/read real time clock, EEPROM
 
*** Passes back "answers" from the IMU/MC,
 
*** Answers requests to commands that we locally bound (executed)
 
**** Only the SC(both locally and via its FUP) can initiate messages that are executed on another processor (MC, IMU);
 
 
 
** This block of code is the primary problem with the system. 
 
*** We need to be able to send/route messages asynchronois to the STATEMACHINE (eg SM)
 
*** Thus the simple routing function needs to be in a thread at a HIGHER level than the SM , and we send messages asynchronous from the state controller, and we need to be
 
 
 
=definitions=
 
*SM, STATEMACHINE :  the primary statemachine that doesn't what were here for.
 
*MC_SM, MOTOR (controller) statemacohne, a statemachgine that runs on the motor controller that does impeadance control, and handles overloads, etc.
 
 
 
*ISP = in system programming - connectors / signals that are connected to ICD2 / Real-ice dsPIC programmer
 
*FUP = field update port, Either of two 9 pin connectors on SC/MC board, uses ASYNC serial to communication without outside world.  Also has pins for ISP
 

Latest revision as of 21:50, 24 October 2009

delete