Other Parts Discussed in Thread: EVM430-FR6047
Tool/software:
Hello,
I am trying to integrate a pair of proportional solenoids with the ultrasonic flowmeter using the EVM430-FR6047 evaluation board. I have two PWM signals running from the booster header of the board to drive the proportional solenoids. However, when I connect the board to the GUI with the PWM code running I'm getting error 22 - Frequency of HSPLL invalid. When I remove the PWM code the error goes away. I have used the PWM demo code for the MPS430 and I am simply running it from main() in the MSP430FR6047EVM_USS_Water_Demo_LPM_02_40_00_00 demo code , please see below.
void main(void)
{
uint16_t reset_source = 0x00;
// Initializes the basic functionality of the system
hal_system_Init();
// Initialize interfaces to user including buttons, LCD, GUI
HMI_Init();
// Verify the reset source and log/report if there was an error
reset_source = hal_system_GetResetSource();
if(reset_source != 0x00)
{
USSLibGUIApp_send_error(COMMAND_HANDLER_ERROR_FAULT_RESET_ERROR,
reset_source);
}
// setup solenoid PWM
SolenoidsInit();
//SetSolenoids(70, 70);
AlgorithmInit();
RunAlgorithm();
__enable_interrupt();
// Initialize the USS Lib
USSLibGUIApp_Init();
// This is the Design Centers Main Loop
USSLibGUIApp_Engine();
}
Am I incorrectly integrating my Solenoid PWM code with the USS_Water_Demo code? Could you please advise on the correct way to integrate my new modules with the demo code as I require the flow rate and temperature from the demo code to change my PWM duty cycle?
I'm fairly new at electronics and working with microcontrollers so apologies if I haven't clearly explained myself. Please let me know if you require any further information to assist with solving this issue.
Many Thanks