pedroborges
New member
good, i was using teensy 3.2 with the code controlling a led panel and it works well.
i bought a teensy 4.0 to try it out.
I changed the arduino program to teensy 4.0 and uploading a lot of errors.
with teensy 3.2 the code works fine, but with teensy 4.0 no longer.
would appreciate help
some of the mistakes that
i bought a teensy 4.0 to try it out.
I changed the arduino program to teensy 4.0 and uploading a lot of errors.
with teensy 3.2 the code works fine, but with teensy 4.0 no longer.
would appreciate help
some of the mistakes that
Code:
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h: In constructor 'SmartMatrix3<refreshDepth, matrixWidth, matrixHeight, panelType, optionFlags>::SmartMatrix3(uint8_t, uint32_t*, uint8_t*)':
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:37:30: error: 'F_BUS' was not declared in this scope
#define TIMER_FREQUENCY (F_BUS/2)
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:38:40: note: in expansion of macro 'TIMER_FREQUENCY'
#define NS_TO_TICKS(X) (uint32_t)(TIMER_FREQUENCY * ((X) / 1000000000.0))
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:43:32: note: in expansion of macro 'NS_TO_TICKS'
#define MIN_BLOCK_PERIOD_TICKS NS_TO_TICKS(MIN_BLOCK_PERIOD_NS)
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:164:35: note: in expansion of macro 'MIN_BLOCK_PERIOD_TICKS'
timerPairIdle->timer_period = MIN_BLOCK_PERIOD_TICKS;
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h: In static member function 'static void SmartMatrix3<refreshDepth, matrixWidth, matrixHeight, panelType, optionFlags>::matrixCalculations(bool)':
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:37:30: error: 'F_BUS' was not declared in this scope
#define TIMER_FREQUENCY (F_BUS/2)
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:47:32: note: in expansion of macro 'TIMER_FREQUENCY'
#define MIN_REFRESH_RATE (((TIMER_FREQUENCY/65535)/16/2) + 1)
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:232:43: note: in expansion of macro 'MIN_REFRESH_RATE'
if (!initial && refreshRate > MIN_REFRESH_RATE) {
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:37:30: error: 'F_BUS' was not declared in this scope
#define TIMER_FREQUENCY (F_BUS/2)
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:47:32: note: in expansion of macro 'TIMER_FREQUENCY'
#define MIN_REFRESH_RATE (((TIMER_FREQUENCY/65535)/16/2) + 1)
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:280:31: note: in expansion of macro 'MIN_REFRESH_RATE'
if (refreshRate > MIN_REFRESH_RATE) {
^
In file included from C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix.h:168:0,
from C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix3.h:29,
from C:\Users\Pedro\Desktop\Codigo teensy\RGB_DMD\RGB_DMD.ino:3:
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:288:13: error: 'FTM1_SC' was not declared in this scope
FTM1_SC = FTM_SC_CLKS(0) | FTM_SC_PS(LATCH_TIMER_PRESCALE);
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:288:36: warning: there are no arguments to 'FTM_SC_CLKS' that depend on a template parameter, so a declaration of 'FTM_SC_CLKS' must be available [-fpermissive]
FTM1_SC = FTM_SC_CLKS(0) | FTM_SC_PS(LATCH_TIMER_PRESCALE);
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:288:70: warning: there are no arguments to 'FTM_SC_PS' that depend on a template parameter, so a declaration of 'FTM_SC_PS' must be available [-fpermissive]
FTM1_SC = FTM_SC_CLKS(0) | FTM_SC_PS(LATCH_TIMER_PRESCALE);
^
In file included from C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix.h:168:0,
from C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix3.h:29,
from C:\Users\Pedro\Desktop\Codigo teensy\RGB_DMD\RGB_DMD.ino:3:
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:306:36: warning: there are no arguments to 'FTM_SC_CLKS' that depend on a template parameter, so a declaration of 'FTM_SC_CLKS' must be available [-fpermissive]
FTM1_SC = FTM_SC_CLKS(1) | FTM_SC_PS(LATCH_TIMER_PRESCALE);
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:306:70: warning: there are no arguments to 'FTM_SC_PS' that depend on a template parameter, so a declaration of 'FTM_SC_PS' must be available [-fpermissive]
FTM1_SC = FTM_SC_CLKS(1) | FTM_SC_PS(LATCH_TIMER_PRESCALE);
^
In file included from C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix.h:168:0,
from C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix3.h:29,
from C:\Users\Pedro\Desktop\Codigo teensy\RGB_DMD\RGB_DMD.ino:3:
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h: In static member function 'static void SmartMatrix3<refreshDepth, matrixWidth, matrixHeight, panelType, optionFlags>::calculateTimerLut()':
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:37:30: error: 'F_BUS' was not declared in this scope
#define TIMER_FREQUENCY (F_BUS/2)
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:40:26: note: in expansion of macro 'TIMER_FREQUENCY'
#define TICKS_PER_ROW (TIMER_FREQUENCY/refreshRate/matrixRowsPerFrame)
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:41:36: note: in expansion of macro 'TICKS_PER_ROW'
#define IDEAL_MSB_BLOCK_TICKS (TICKS_PER_ROW/2)
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:317:30: note: in expansion of macro 'IDEAL_MSB_BLOCK_TICKS'
uint16_t msbBlockTicks = IDEAL_MSB_BLOCK_TICKS + MSB_BLOCK_TICKS_ADJUSTMENT_INCREMENT;
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h: In member function 'void SmartMatrix3<refreshDepth, matrixWidth, matrixHeight, panelType, optionFlags>::setRefreshRate(uint8_t)':
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:37:30: error: 'F_BUS' was not declared in this scope
#define TIMER_FREQUENCY (F_BUS/2)
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:47:32: note: in expansion of macro 'TIMER_FREQUENCY'
#define MIN_REFRESH_RATE (((TIMER_FREQUENCY/65535)/16/2) + 1)
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:408:26: note: in expansion of macro 'MIN_REFRESH_RATE'
if (newRefreshRate > MIN_REFRESH_RATE)
^
In file included from C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix.h:168:0,
from C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix3.h:29,
from C:\Users\Pedro\Desktop\Codigo teensy\RGB_DMD\RGB_DMD.ino:3:
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h: In member function 'void SmartMatrix3<refreshDepth, matrixWidth, matrixHeight, panelType, optionFlags>::begin()':
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:502:5: error: 'FTM1_SC' was not declared in this scope
FTM1_SC = 0;
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:503:5: error: 'FTM1_CNT' was not declared in this scope
FTM1_CNT = 0;
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:504:5: error: 'FTM1_MOD' was not declared in this scope
FTM1_MOD = IDEAL_MSB_BLOCK_TICKS;
^
In file included from C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix.h:168:0,
from C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix3.h:29,
from C:\Users\Pedro\Desktop\Codigo teensy\RGB_DMD\RGB_DMD.ino:3:
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:37:30: error: 'F_BUS' was not declared in this scope
#define TIMER_FREQUENCY (F_BUS/2)
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:40:26: note: in expansion of macro 'TIMER_FREQUENCY'
#define TICKS_PER_ROW (TIMER_FREQUENCY/refreshRate/matrixRowsPerFrame)
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:41:36: note: in expansion of macro 'TICKS_PER_ROW'
#define IDEAL_MSB_BLOCK_TICKS (TICKS_PER_ROW/2)
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:504:16: note: in expansion of macro 'IDEAL_MSB_BLOCK_TICKS'
FTM1_MOD = IDEAL_MSB_BLOCK_TICKS;
^
In file included from C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix.h:168:0,
from C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix3.h:29,
from C:\Users\Pedro\Desktop\Codigo teensy\RGB_DMD\RGB_DMD.ino:3:
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:508:5: error: 'FTM1_C0V' was not declared in this scope
FTM1_C0V = LATCH_TIMER_PULSE_WIDTH_TICKS;
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:510:5: error: 'FTM1_C1V' was not declared in this scope
FTM1_C1V = IDEAL_MSB_BLOCK_TICKS;
^
In file included from C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix.h:29:0,
from C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix3.h:29,
from C:\Users\Pedro\Desktop\Codigo teensy\RGB_DMD\RGB_DMD.ino:3:
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/MatrixHardware_RGB_DMD.h:95:43: warning: there are no arguments to 'PORT_PCR_MUX' that depend on a template parameter, so a declaration of 'PORT_PCR_MUX' must be available [-fpermissive]
CORE_PIN3_CONFIG |= PORT_PCR_MUX(3) | PORT_PCR_DSE | PORT_PCR_SRE; \
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:513:5: note: in expansion of macro 'ENABLE_LATCH_PWM_OUTPUT'
ENABLE_LATCH_PWM_OUTPUT();
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/MatrixHardware_RGB_DMD.h:95:47: error: 'PORT_PCR_DSE' was not declared in this scope
CORE_PIN3_CONFIG |= PORT_PCR_MUX(3) | PORT_PCR_DSE | PORT_PCR_SRE; \
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:513:5: note: in expansion of macro 'ENABLE_LATCH_PWM_OUTPUT'
ENABLE_LATCH_PWM_OUTPUT();
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/MatrixHardware_RGB_DMD.h:95:62: error: 'PORT_PCR_SRE' was not declared in this scope
CORE_PIN3_CONFIG |= PORT_PCR_MUX(3) | PORT_PCR_DSE | PORT_PCR_SRE; \
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:513:5: note: in expansion of macro 'ENABLE_LATCH_PWM_OUTPUT'
ENABLE_LATCH_PWM_OUTPUT();
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/MatrixHardware_RGB_DMD.h:99:42: warning: there are no arguments to 'PORT_PCR_MUX' that depend on a template parameter, so a declaration of 'PORT_PCR_MUX' must be available [-fpermissive]
CORE_PIN4_CONFIG = PORT_PCR_MUX(3) | PORT_PCR_DSE | PORT_PCR_SRE; \
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:514:5: note: in expansion of macro 'ENABLE_OE_PWM_OUTPUT'
ENABLE_OE_PWM_OUTPUT();
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/MatrixHardware_RGB_DMD.h:99:46: error: 'PORT_PCR_DSE' was not declared in this scope
CORE_PIN4_CONFIG = PORT_PCR_MUX(3) | PORT_PCR_DSE | PORT_PCR_SRE; \
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:514:5: note: in expansion of macro 'ENABLE_OE_PWM_OUTPUT'
ENABLE_OE_PWM_OUTPUT();
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/MatrixHardware_RGB_DMD.h:99:61: error: 'PORT_PCR_SRE' was not declared in this scope
CORE_PIN4_CONFIG = PORT_PCR_MUX(3) | PORT_PCR_DSE | PORT_PCR_SRE; \
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:514:5: note: in expansion of macro 'ENABLE_OE_PWM_OUTPUT'
ENABLE_OE_PWM_OUTPUT();
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/MatrixHardware_RGB_DMD.h:104:44: warning: there are no arguments to 'PORT_PCR_IRQC' that depend on a template parameter, so a declaration of 'PORT_PCR_IRQC' must be available [-fpermissive]
CORE_PIN3_CONFIG |= PORT_PCR_IRQC(1); \
^
C:\Users\Pedro\Documents\Arduino\libraries\SmartMatrix-master\src/SmartMatrix_Impl.h:517:5: note: in expansion of macro 'ENABLE_LATCH_RISING_EDGE_GPIO_INT'
ENABLE_LATCH_RISING_EDGE_GPIO_INT();
^
Last edited by a moderator: