|
Software phase, ARM Cortex_M3 STM32 based highly integrated control board. May 11, 2009 03:09AM |
Registered: 17 years ago Posts: 242 |

<
|
Re: Software phase, ARM Cortex_M3 STM32 based highly integrated control board. May 11, 2009 10:34AM |
Registered: 18 years ago Posts: 106 |
|
Re: Software phase, ARM Cortex_M3 STM32 based highly integrated control board. May 12, 2009 03:02AM |
Registered: 17 years ago Posts: 242 |
, especially when I'm new to C too, because it takes me longer to pinpoint syntax errors versus bad variable definitions.|
Re: Software phase, ARM Cortex_M3 STM32 based highly integrated control board. May 12, 2009 12:20PM |
Registered: 18 years ago Posts: 106 |
|
Re: Software phase, ARM Cortex_M3 STM32 based highly integrated control board. May 14, 2009 05:18AM |
Registered: 17 years ago Posts: 242 |

|
Re: Software phase, ARM Cortex_M3 STM32 based highly integrated control board. May 14, 2009 05:50AM |
Admin Registered: 19 years ago Posts: 7,883 |
|
Re: Software phase, ARM Cortex_M3 STM32 based highly integrated control board. May 15, 2009 04:11AM |
Registered: 17 years ago Posts: 242 |

|
Re: Software phase, ARM Cortex_M3 STM32 based highly integrated control board. May 15, 2009 04:53AM |
Registered: 17 years ago Posts: 242 |

|
Re: Software phase, ARM Cortex_M3 STM32 based highly integrated control board. May 18, 2009 06:34AM |
Registered: 17 years ago Posts: 242 |
|
Re: Software phase, ARM Cortex_M3 STM32 based highly integrated control board. May 21, 2009 04:41AM |
Registered: 17 years ago Posts: 242 |


|
Re: Software phase, ARM Cortex_M3 STM32 based highly integrated control board. May 25, 2009 05:10AM |
Registered: 17 years ago Posts: 242 |
Finally, I tracked it down to having assumed that parameter n1 and parameter n2 and parameter n3 etc(for example) being linked as n1 | n2 | n3, having assumed that "|" meant a bitwise logical and.

I can add them into my project for direct viewing, but when I try to assemble, the compiler gets confused, and complains about errors, if I include all the files.|
Re: Software phase, ARM Cortex_M3 STM32 based highly integrated control board. May 25, 2009 06:11AM |
Registered: 17 years ago Posts: 186 |
|
Re: Software phase, ARM Cortex_M3 STM32 based highly integrated control board. May 25, 2009 08:38AM |
Registered: 17 years ago Posts: 251 |
|
Re: Software phase, ARM Cortex_M3 STM32 based highly integrated control board. May 26, 2009 03:24AM |
Registered: 17 years ago Posts: 242 |

|
Re: Software phase, ARM Cortex_M3 STM32 based highly integrated control board. May 26, 2009 07:15AM |
Registered: 17 years ago Posts: 242 |

However, it works, so I can get on with shifting my servo test stuff to being sys tick triggered, and I can start implementing other important things like communications and servo PWM wave form generation.
|
Re: Software phase, ARM Cortex_M3 STM32 based highly integrated control board. May 27, 2009 09:16AM |
|
Re: Software phase, ARM Cortex_M3 STM32 based highly integrated control board. May 28, 2009 03:09AM |
Registered: 17 years ago Posts: 242 |
|
Re: Software phase, ARM Cortex_M3 STM32 based highly integrated control board. May 28, 2009 04:16AM |
Admin Registered: 19 years ago Posts: 7,883 |
static int a; // a is local to this file
void v(void) {
++a;
}
int a; // a is a global variable
void v(void) {
++a;
}
extern int a;
volatile int a;
|
Re: Software phase, ARM Cortex_M3 STM32 based highly integrated control board. May 28, 2009 06:35PM |

Nick.
|
Re: Software phase, ARM Cortex_M3 STM32 based highly integrated control board. May 29, 2009 04:44AM |
Registered: 17 years ago Posts: 242 |
|
Re: Software phase, ARM Cortex_M3 STM32 based highly integrated control board. May 29, 2009 05:27AM |
Admin Registered: 19 years ago Posts: 7,883 |
|
Re: Software phase, ARM Cortex_M3 STM32 based highly integrated control board. May 29, 2009 06:37AM |
|
Re: Software phase, ARM Cortex_M3 STM32 based highly integrated control board. May 29, 2009 08:07AM |
Registered: 17 years ago Posts: 242 |
|
Re: Software phase, ARM Cortex_M3 STM32 based highly integrated control board. May 31, 2009 05:00PM |
Registered: 16 years ago Posts: 248 |
void SysTickHandler(void)
{
//if (ledtogglestate==0) {GPIO_WriteBit(GPIOB,GPIO_Pin_11,Bit_SET); ledtogglestate=1;}
//else {GPIO_WriteBit(GPIOB,GPIO_Pin_11,Bit_RESET); ledtogglestate=0;} // piezo
U16 Motor1Phase = 0;
U16 Motor2Phase = 0;
U16 Motor3Phase = 0;
U16 Motor4Phase = 0;
GPIO_ResetBits(GPIOC, 0b11110000000000);
GPIO_ResetBits(GPIOD, 0b111111111111);
switch (MotorPhase[1]&3) //motor #1
{ //56a9
case 0:
Motor1Phase = PHASE0;
break;
case 1:
Motor1Phase = PHASE1;
break;
case 2:
Motor1Phase = PHASE2;
break;
case 3:
Motor1Phase = PHASE3;
break;
}
switch (MotorPhase[2]&3) //motor #2
{
case 0:
Motor2Phase = PHASE0;
break;
case 1:
Motor2Phase = PHASE1;
break;
case 2:
Motor2Phase = PHASE2;
break;
case 3:
Motor2Phase = PHASE3;
break;
}
switch (MotorPhase[3]&3) //motor #3
{
case 0:
Motor3Phase = PHASE0;
break;
case 1:
Motor3Phase = PHASE1;
break;
case 2:
Motor3Phase = PHASE2;
break;
case 3:
Motor3Phase = PHASE3;
break;
}
switch (MotorPhase[4]&3) //motor #4
{
case 0:
Motor4Phase = PHASE0;
break;
case 1:
Motor4Phase = PHASE1;
break;
case 2:
Motor4Phase = PHASE2;
break;
case 3:
Motor4Phase = PHASE3;
break;
}
GPIO_SetBits(GPIOC, (Motor2Phase << 8));
GPIO_SetBits(GPIOD, ((Motor1Phase << 8) | (Motor3Phase << 4) | Motor4Phase));
}
|
Re: Software phase, ARM Cortex_M3 STM32 based highly integrated control board. May 31, 2009 07:01PM |
Registered: 17 years ago Posts: 242 |
|
Re: Software phase, ARM Cortex_M3 STM32 based highly integrated control board. June 01, 2009 08:26AM |
Registered: 16 years ago Posts: 248 |
|
Global volatile poor choice for use in ISR June 01, 2009 10:13AM |
Registered: 17 years ago Posts: 251 |
|
Re: Global volatile poor choice for use in ISR June 01, 2009 11:47AM |
Registered: 16 years ago Posts: 248 |
|
Global volatile poor choice for use in ISR June 01, 2009 01:00PM |
Registered: 17 years ago Posts: 251 |
|
Re: Software phase, ARM Cortex_M3 STM32 based highly integrated control board. June 02, 2009 03:12AM |
Registered: 17 years ago Posts: 242 |
