git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@13360 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
882f416761
commit
4c56ee69c6
|
@ -66,12 +66,12 @@ endif
|
||||||
|
|
||||||
# Enables the use of FPU (no, softfp, hard).
|
# Enables the use of FPU (no, softfp, hard).
|
||||||
ifeq ($(USE_FPU),)
|
ifeq ($(USE_FPU),)
|
||||||
USE_FPU = hard
|
USE_FPU = no
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# FPU-related options.
|
# FPU-related options.
|
||||||
ifeq ($(USE_FPU_OPT),)
|
ifeq ($(USE_FPU_OPT),)
|
||||||
USE_FPU_OPT = -mfloat-abi=$(USE_FPU) -mfpu=fpv5-sp-d16 -fsingle-precision-constant
|
USE_FPU_OPT = -mfloat-abi=$(USE_FPU) -mfpu=fpv5-d16
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -112,7 +112,6 @@ include $(CHIBIOS)/tools/mk/autobuild.mk
|
||||||
include $(CHIBIOS)/test/lib/test.mk
|
include $(CHIBIOS)/test/lib/test.mk
|
||||||
include $(CHIBIOS)/test/rt/rt_test.mk
|
include $(CHIBIOS)/test/rt/rt_test.mk
|
||||||
include $(CHIBIOS)/test/oslib/oslib_test.mk
|
include $(CHIBIOS)/test/oslib/oslib_test.mk
|
||||||
include $(CHIBIOS)/os/hal/lib/streams/streams.mk
|
|
||||||
|
|
||||||
# Define linker script file here
|
# Define linker script file here
|
||||||
LDSCRIPT= $(STARTUPLD)/STM32H755xI_M7.ld
|
LDSCRIPT= $(STARTUPLD)/STM32H755xI_M7.ld
|
||||||
|
@ -151,7 +150,7 @@ CPPWARN = -Wall -Wextra -Wundef
|
||||||
#
|
#
|
||||||
|
|
||||||
# List all user C define here, like -D_DEBUG=1
|
# List all user C define here, like -D_DEBUG=1
|
||||||
UDEFS = -DCORE_CM7 -DCHPRINTF_USE_FLOAT=1
|
UDEFS = -DCORE_CM7
|
||||||
|
|
||||||
# Define ASM defines here
|
# Define ASM defines here
|
||||||
UADEFS =
|
UADEFS =
|
||||||
|
|
|
@ -19,8 +19,6 @@
|
||||||
#include "rt_test_root.h"
|
#include "rt_test_root.h"
|
||||||
#include "oslib_test_root.h"
|
#include "oslib_test_root.h"
|
||||||
|
|
||||||
#include "chprintf.h"
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is a periodic thread that does absolutely nothing except flashing
|
* This is a periodic thread that does absolutely nothing except flashing
|
||||||
* a LED.
|
* a LED.
|
||||||
|
@ -46,12 +44,9 @@ static THD_FUNCTION(Thread1, arg) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "i_ctrl.h"
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Application entry point.
|
* Application entry point.
|
||||||
*/
|
*/
|
||||||
__attribute__((section(".ram6_init.main")))
|
|
||||||
int main(void) {
|
int main(void) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -69,37 +64,6 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
sdStart(&SD3, NULL);
|
sdStart(&SD3, NULL);
|
||||||
|
|
||||||
time_measurement_t tm1;
|
|
||||||
chTMObjectInit(&tm1);
|
|
||||||
|
|
||||||
float32_t vbridge[N_PHASES];
|
|
||||||
|
|
||||||
for (int i = 0; i < 10; i++) {
|
|
||||||
chTMStartMeasurementX(&tm1);
|
|
||||||
{
|
|
||||||
static float32_t duty[N_PHASES] = {0.0f};
|
|
||||||
|
|
||||||
float32_t il[N_PHASES] = {1.0f, 5.0f, 3.0f};
|
|
||||||
float32_t vc[N_PHASES] = {300.0f, 400.0f, 100.0f};
|
|
||||||
float32_t vDC[DC_RAILS] = {450.0f, 400.0f};
|
|
||||||
float32_t iL_ref[N_PHASES] = {7.0f, 10.0f, 5.0f};
|
|
||||||
bool enable = 1;
|
|
||||||
|
|
||||||
ictrl_3L_step(il, vc, vDC, iL_ref, enable, vbridge);
|
|
||||||
|
|
||||||
calculate_duty_cycle(vbridge, vDC, duty);
|
|
||||||
}
|
|
||||||
chTMStopMeasurementX(&tm1);
|
|
||||||
}
|
|
||||||
|
|
||||||
chprintf((BaseSequentialStream *)&SD3, "Measurements: %d\r\n", tm1.n);
|
|
||||||
chprintf((BaseSequentialStream *)&SD3, "Best measurement: %d\r\n", tm1.best);
|
|
||||||
chprintf((BaseSequentialStream *)&SD3, "Worst measurement: %d\r\n", tm1.worst);
|
|
||||||
chprintf((BaseSequentialStream *)&SD3, "Last measurement: %d\r\n", tm1.last);
|
|
||||||
chprintf((BaseSequentialStream *)&SD3, "vbridge[0]: %f\r\n", vbridge[0]);
|
|
||||||
chprintf((BaseSequentialStream *)&SD3, "vbridge[1]: %f\r\n", vbridge[1]);
|
|
||||||
chprintf((BaseSequentialStream *)&SD3, "vbridge[2]: %f\r\n", vbridge[2]);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Creates the example thread.
|
* Creates the example thread.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue