im just scrolling thru avr emulation.h and noticed:
is there a reason why only pins 13 (i could guess because of the led) and pin11 are set to drive strength enable? has anyone played with the slew rate (PORT_PCR_SRE) and drive strength? (PORT_PCR_DSE)
im wondering what impact, if any, will they do when applied on master
seeing as im using spi2 default pin 43 for CS, im wondering why that isnt listed under avr emulation either, perhaps, we might have different pin configs worth testing?
spi2
miso/mosi/sck dont have any set
Code:
inline void enable_pins(void) __attribute__((always_inline)) {
//serial_print("enable_pins\n");
if ((pinout & 1) == 0) {
CORE_PIN11_CONFIG = PORT_PCR_DSE | PORT_PCR_MUX(2); // MOSI0 = 11 (PTC6)
} else {
CORE_PIN7_CONFIG = PORT_PCR_MUX(2); // MOSI0 = 7 (PTD2)
}
if ((pinout & 2) == 0) {
CORE_PIN12_CONFIG = PORT_PCR_MUX(2); // MISO0 = 12 (PTC7)
} else {
CORE_PIN8_CONFIG = PORT_PCR_MUX(2); // MISO0 = 8 (PTD3)
}
if ((pinout & 4) == 0) {
CORE_PIN13_CONFIG = PORT_PCR_DSE | PORT_PCR_MUX(2); // SCK0 = 13 (PTC5)
} else {
CORE_PIN14_CONFIG = PORT_PCR_MUX(2); // SCK0 = 14 (PTD1)
}
is there a reason why only pins 13 (i could guess because of the led) and pin11 are set to drive strength enable? has anyone played with the slew rate (PORT_PCR_SRE) and drive strength? (PORT_PCR_DSE)
im wondering what impact, if any, will they do when applied on master
seeing as im using spi2 default pin 43 for CS, im wondering why that isnt listed under avr emulation either, perhaps, we might have different pin configs worth testing?
spi2
Code:
enable_pins(void) __attribute__((always_inline)) {
//serial_print("enable_pins\n");
if ((pinout & 1) == 0) {
CORE_PIN44_CONFIG = PORT_PCR_MUX(2);
} else {
CORE_PIN52_CONFIG = PORT_PCR_MUX(2);
}
if ((pinout & 2) == 0) {
CORE_PIN45_CONFIG = PORT_PCR_MUX(2);
} else {
CORE_PIN51_CONFIG = PORT_PCR_MUX(2);
}
if ((pinout & 4) == 0) {
CORE_PIN46_CONFIG = PORT_PCR_MUX(2);
} else {
CORE_PIN53_CONFIG = PORT_PCR_MUX(2);
}