This file contains the table definitions used for motor control.
Definition in file PMSMtables.h.
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Variables | |
| __flash const uint8_t | blockCommutationTableForward [16] |
| Block commutation port direction masks, forward driving. | |
| __flash const uint8_t | blockCommutationTableReverse [16] |
| Block commutation port direction masks, reverse driving. | |
| __flash const uint16_t | CSOffsetsForward [8] |
| Sine table offset values corresponding to hall sensor values when running in the forward direction. | |
| __flash const uint16_t | CSOffsetsReverse [8] |
| Sine table offset values corresponding to hall sensor values when running in the reverse direction. | |
| __flash const uint16_t | divisionTable [256] |
| Divistion table used to obtain sine table increment without performing a division at high motor speed. | |
| __flash const uint8_t | expectedHallSequenceForward [7] |
| Table of next expected hall sensor value when running forward. | |
| __flash const uint8_t | expectedHallSequenceReverse [7] |
| Table of next expected hall sensor value when running in the reverse direction. | |
| __flash const uint8_t | sineTable [SINE_TABLE_LENGTH *3] |
| Sine wave modulation table. | |
|
|
Initial value:
{
0, 0,
(1 << PB3), (1 << PD5),
(1 << PB2), (1 << PD6),
((1 << PB2) | (1 << PB3)), 0x00,
(1 << PB1), (1 << PD3),
(1 << PB1), (1 << PD5),
0x00, ((1 << PD6) | (1 << PD3)),
0, 0
}
This array contains port direction masks for block commutation when running in the forward direction. Definition at line 503 of file PMSMtables.h. Referenced by BlockCommutate(). |
|
|
Initial value:
{
0, 0,
0x00, ((1 << PD6) | (1 << PD3)),
(1 << PB1), (1 << PD5),
(1 << PB1), (1 << PD3),
((1 << PB2) | (1 << PB3)), 0x00,
(1 << PB2), (1 << PD6),
(1 << PB3), (1 << PD5),
0, 0
}
This array contains port direction masks for block commutation when running in the reverse direction. Definition at line 521 of file PMSMtables.h. Referenced by BlockCommutate(). |
|
|
Initial value:
{
0,
5 * (SINE_TABLE_LENGTH / 6),
1 * (SINE_TABLE_LENGTH / 6),
0 * (SINE_TABLE_LENGTH / 6),
3 * (SINE_TABLE_LENGTH / 6),
4 * (SINE_TABLE_LENGTH / 6),
2 * (SINE_TABLE_LENGTH / 6),
0
}
This array contains the sine table offset that corresponds to the hall sensor values when running in the forward direction. At the moment of a hall change, using the new hall sensor value as index into this table returns the sine table offset that will synchronize the generated sine waves to the back-EMF of the motor. Definition at line 569 of file PMSMtables.h. Referenced by HallChangeISR(). |
|
|
Initial value:
{
0,
1 * (SINE_TABLE_LENGTH / 6),
5 * (SINE_TABLE_LENGTH / 6),
0 * (SINE_TABLE_LENGTH / 6),
3 * (SINE_TABLE_LENGTH / 6),
2 * (SINE_TABLE_LENGTH / 6),
4 * (SINE_TABLE_LENGTH / 6),
0
}
This array contains the sine table offset that corresponds to the hall sensor values when running in the reverse direction. At the moment of a hall change, using the new hall sensor value as index into this table returns the sine table offset that will synchronize the generated sine waves to the back-EMF of the motor. Definition at line 590 of file PMSMtables.h. Referenced by HallChangeISR(). |
|
|
Divistion table used to obtain sine table increment without performing a division at high motor speed. This table contains 8.8 fixed point step size values for 'ticks' less than 256. Definition at line 239 of file PMSMtables.h. Referenced by SineTableIncrementCalculate(). |
|
|
Initial value:
{
0xff, 3, 6, 2, 5, 1, 4
}
This array contains the next expected hall sensor value when running in the forward direction. The value at the index pointed to by the current hall sensor value is the next expected hall sensor value in the forward direction. Definition at line 541 of file PMSMtables.h. Referenced by ActualDirectionUpdate(). |
|
|
Initial value:
{
0xff, 5, 3, 1, 6, 4, 2
}
This array contains the next expected hall sensor value when running in the reverse direction. The value at the index pointed to by the current hall sensor value is the next expected hall sensor value in the reverse direction. Definition at line 555 of file PMSMtables.h. Referenced by ActualDirectionUpdate(). |
|
|
Sine wave modulation table. Table containing modulation values for all three phases. The table is organized as [U1, V1, W1, U2, V2, W2, ...] for forward driving, and [U1, W1, V1, U2, W2, V2, ...] for reverse driving. Definition at line 37 of file PMSMtables.h. Referenced by Timer1CaptureISR(). |
1.4.4