Other Parts Discussed in Thread: MSP430FR2355
we have few queries on TIDA board firmware for BLDC motor driver, listed below.
The sample can be downloaded from this link:
1- The SensorlessTrapController.IPDStatus is assigned the value ADC_READ in the ISR when the state machine is in MOTOR_IPD state. But then, post this assignment, I don't see this being handled anywhere else in the code. It again looks like the code could reach this point and get stuck here indefinitely. Where is the logic to get out of this state implemented?
2- The below are vectors being used in the ISR of the motor control software. Not able to find the corresponding counter registers etc. for these vectors anywhere including datasheet.
We are refering to msp430fr2355 datasheet which is used in TIDA board
3- The logic to convert acceleration to angular distance is implemented this way:
SensorlessTrapController.AccelRate; //increase velocity by the acceleration rate
- (SensorlessTrapController.AccelRate >> 1)) >> 3; //calculate distance
What is the physics based derivation for this logic?
Also, in the above code, when SensorlessTrapController.AccelDistance hits the value 20834, it means it's travelled 60 degrees. How is 20834 derived?
4- I have a couple questions on one particular state in the state machine - MOTOR_DIRECTION
- Where is the logic for MOTOR_DIRECTION implemented? From my perusal of the code, I am not able to find that anywhere?
- Once the ApplicationStatus.currentstate is set to MOTOR_DIRECTION, how does it get back to a different state? I don't find code anywhere for it to change any state post this assignment. Looks like it might just get stuck there.
Please help us to understand it in detail