Вынесен опрос фримастера в фон и теперь работает на 115200

This commit is contained in:
seklyuts 2024-09-05 12:12:13 +03:00
parent fa206d1d68
commit 0f29a7eb48
6 changed files with 5 additions and 59 deletions

View File

@ -21,6 +21,7 @@
#include "biss.h"
#include "rele.h"
#include "uart_4Mbit.h"
#include "frm_uart.h"
void main(void)
{
@ -31,6 +32,7 @@ void main(void)
// asm (" NOP");
// frmmstr_run();
UartErrorReset();
FMSTR_Poll();
SyncPWMFonRun();
rele_run();
AdcRun();

View File

@ -275,14 +275,6 @@ void SdfmInit(void)
Sdfm_configureData_filter(SDFM2, FILTER4, FILTER_DISABLE, SINC3, OSR_32, DATA_16_BIT, SHIFT_0_BITS);
EALLOW;
// Sdfm1Regs.SDSYNC1.bit.SYNCSEL = 0x3F;
// Sdfm2Regs.SDSYNC1.bit.SYNCSEL = 0x3F;
// Sdfm1Regs.SDSYNC2.bit.SYNCSEL = 0x3F;
// Sdfm2Regs.SDSYNC2.bit.SYNCSEL = 0x3F;
// Sdfm1Regs.SDSYNC3.bit.SYNCSEL = 0x3F;
// Sdfm2Regs.SDSYNC3.bit.SYNCSEL = 0x3F;
// Sdfm1Regs.SDSYNC4.bit.SYNCSEL = 0x3F;
// Sdfm2Regs.SDSYNC4.bit.SYNCSEL = 0x3F;
Sdfm1Regs.SDDFPARM1.bit.SDSYNCEN = 0;
Sdfm2Regs.SDDFPARM1.bit.SDSYNCEN = 0;
@ -294,24 +286,6 @@ void SdfmInit(void)
Sdfm2Regs.SDDFPARM4.bit.SDSYNCEN = 0;
EDIS;
// Sdfm_configureInterrupt(SDFM1, FILTER1, IEH_DISABLE, IEL_DISABLE, MFIE_ENABLE, AE_ENABLE);
// Sdfm_configureInterrupt(SDFM1, FILTER2, IEH_DISABLE, IEL_DISABLE, MFIE_ENABLE, AE_ENABLE);
// Sdfm_configureInterrupt(SDFM1, FILTER3, IEH_DISABLE, IEL_DISABLE, MFIE_ENABLE, AE_ENABLE);
// Sdfm_configureInterrupt(SDFM1, FILTER4, IEH_DISABLE, IEL_DISABLE, MFIE_ENABLE, AE_ENABLE);
////
// Sdfm_configureInterrupt(SDFM2, FILTER1, IEH_DISABLE, IEL_DISABLE, MFIE_ENABLE, AE_ENABLE);
// Sdfm_configureInterrupt(SDFM2, FILTER2, IEH_DISABLE, IEL_DISABLE, MFIE_ENABLE, AE_ENABLE);
// Sdfm_configureInterrupt(SDFM2, FILTER3, IEH_DISABLE, IEL_DISABLE, MFIE_ENABLE, AE_ENABLE);
// Sdfm_configureInterrupt(SDFM2, FILTER4, IEH_DISABLE, IEL_DISABLE, MFIE_ENABLE, AE_ENABLE);
//
// Enable master interrupt so that any of the filter interrupts can trigger
// by SDFM interrupt to CPU
//
//Sdfm1Regs.SDCPARM4.bit.MFIE = 1;
//Sdfm1Regs.SDDFPARM4.bit.AE = 1;
Sdfm_enableMIE(SDFM1);
Sdfm_enableMIE(SDFM2);

View File

@ -5,7 +5,6 @@
* Author: seklyuts
*/
#include "f28x_project.h"
#include "frmmstr_run.h"
#include "init_perif.h"
#include "gpio_init.h"
#include "fault.h"
@ -13,6 +12,7 @@
#include "buttons.h"
#include "eqep.h"
#include "SyncPWMFonRun.h"
#include "frm_uart.h"
volatile uint16_t counter=0 ;
volatile uint16_t counter1=0 ;
@ -30,7 +30,7 @@ void SyncPWMFonRun(void)
if(SynchPWMFonRunEnable())
{
#ifdef FREEMASTER
frmmstr_run();
FMSTR_Recorder();
#endif
SynchPWMFonRunEnableClr();
if(counter < 100) counter++;

View File

@ -10,7 +10,7 @@
#include "SyncPWMFonRun.h"
#define LSPCLK_HZ 100000000.0
#define BAUD 38400.0
#define BAUD 115200.0
#define BRR LSPCLK_HZ/(BAUD*8)

View File

@ -1,17 +0,0 @@
/*
* frmmstr_run.c
*
* Created on: 14 <EFBFBD><EFBFBD><EFBFBD><EFBFBD>. 2023 <EFBFBD>.
* Author: seklyuts
*/
#include "f28x_project.h"
#include "frm_uart.h"
void frmmstr_run(void)
{
FMSTR_Poll();
FMSTR_Recorder();
}

View File

@ -1,13 +0,0 @@
/*
* frmmstr_run.h
*
* Created on: 14 ñåíò. 2023 ã.
* Author: seklyuts
*/
#ifndef SRC_FRMMSTR_RUN_H_
#define SRC_FRMMSTR_RUN_H_
void frmmstr_run(void);
#endif /* SRC_FRMMSTR_RUN_H_ */