add systick ; issue -- i2c transfer unstable
This commit is contained in:
7
empty.c
7
empty.c
@@ -45,6 +45,9 @@ const float num_f = 0.123456f;
|
||||
volatile uint16_t count = 0 ;
|
||||
|
||||
|
||||
int pp = 7; //电机极对数
|
||||
int Dir = 1; //电机编码器方向
|
||||
|
||||
int main(void)
|
||||
{
|
||||
SYSCFG_DL_init();
|
||||
@@ -53,10 +56,12 @@ int main(void)
|
||||
while (1) {
|
||||
DL_GPIO_togglePins(LED_PORT,LED_PA0_PIN);
|
||||
//MT6701_get_angle_degree();
|
||||
delay_ms(20);
|
||||
delay_ms(50);
|
||||
volatile float angle_rad = GetAngle();
|
||||
//printf("test \n");
|
||||
printf("angle %.5f \n" , angle_rad);
|
||||
volatile uint32_t tick = DL_SYSTICK_getValue();
|
||||
printf("systick is %x \n",tick);
|
||||
|
||||
PWM_Channel1(count ++);
|
||||
if(count == 750)
|
||||
|
||||
Reference in New Issue
Block a user