Merge pull request #1268 from PavelSindler/3_4_2
MK2.5 MMU sw reset at setup function
This commit is contained in:
commit
be9f921153
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
// Firmware version
|
// Firmware version
|
||||||
#define FW_VERSION "3.4.2"
|
#define FW_VERSION "3.4.2"
|
||||||
#define FW_COMMIT_NR 1358
|
#define FW_COMMIT_NR 1360
|
||||||
// FW_VERSION_UNKNOWN means this is an unofficial build.
|
// FW_VERSION_UNKNOWN means this is an unofficial build.
|
||||||
// The firmware should only be checked into github with this symbol.
|
// The firmware should only be checked into github with this symbol.
|
||||||
#define FW_DEV_VERSION FW_VERSION_UNKNOWN
|
#define FW_DEV_VERSION FW_VERSION_UNKNOWN
|
||||||
|
@ -1180,6 +1180,9 @@ void setup()
|
|||||||
}
|
}
|
||||||
MYSERIAL.begin(BAUDRATE);
|
MYSERIAL.begin(BAUDRATE);
|
||||||
fdev_setup_stream(uartout, uart_putchar, NULL, _FDEV_SETUP_WRITE); //setup uart out stream
|
fdev_setup_stream(uartout, uart_putchar, NULL, _FDEV_SETUP_WRITE); //setup uart out stream
|
||||||
|
#ifndef W25X20CL
|
||||||
|
SERIAL_PROTOCOLLNPGM("start");
|
||||||
|
#endif //W25X20CL
|
||||||
stdout = uartout;
|
stdout = uartout;
|
||||||
SERIAL_ECHO_START;
|
SERIAL_ECHO_START;
|
||||||
printf_P(PSTR(" " FW_VERSION_FULL "\n"));
|
printf_P(PSTR(" " FW_VERSION_FULL "\n"));
|
||||||
|
@ -21,8 +21,9 @@
|
|||||||
#define MMU_CMD_TIMEOUT 300000ul //5min timeout for mmu commands (except P0)
|
#define MMU_CMD_TIMEOUT 300000ul //5min timeout for mmu commands (except P0)
|
||||||
#define MMU_P0_TIMEOUT 3000ul //timeout for P0 command: 3seconds
|
#define MMU_P0_TIMEOUT 3000ul //timeout for P0 command: 3seconds
|
||||||
|
|
||||||
#define MMU_HWRESET
|
#ifdef MMU_HWRESET
|
||||||
#define MMU_RST_PIN 76
|
#define MMU_RST_PIN 76
|
||||||
|
#endif //MMU_HWRESET
|
||||||
|
|
||||||
bool mmu_enabled = false;
|
bool mmu_enabled = false;
|
||||||
|
|
||||||
@ -92,8 +93,10 @@ int8_t mmu_rx_start(void)
|
|||||||
//initialize mmu2 unit - first part - should be done at begining of startup process
|
//initialize mmu2 unit - first part - should be done at begining of startup process
|
||||||
void mmu_init(void)
|
void mmu_init(void)
|
||||||
{
|
{
|
||||||
|
#ifdef MMU_HWRESET
|
||||||
digitalWrite(MMU_RST_PIN, HIGH);
|
digitalWrite(MMU_RST_PIN, HIGH);
|
||||||
pinMode(MMU_RST_PIN, OUTPUT); //setup reset pin
|
pinMode(MMU_RST_PIN, OUTPUT); //setup reset pin
|
||||||
|
#endif //MMU_HWRESET
|
||||||
uart2_init(); //init uart2
|
uart2_init(); //init uart2
|
||||||
_delay_ms(10); //wait 10ms for sure
|
_delay_ms(10); //wait 10ms for sure
|
||||||
mmu_reset(); //reset mmu (HW or SW), do not wait for response
|
mmu_reset(); //reset mmu (HW or SW), do not wait for response
|
||||||
|
@ -614,6 +614,7 @@
|
|||||||
//#define SUPPORT_VERBOSITY
|
//#define SUPPORT_VERBOSITY
|
||||||
|
|
||||||
#define MMU_REQUIRED_FW_BUILDNR 83
|
#define MMU_REQUIRED_FW_BUILDNR 83
|
||||||
|
#define MMU_HWRESET
|
||||||
//#define MMU_DEBUG //print communication between MMU2 and printer on serial
|
//#define MMU_DEBUG //print communication between MMU2 and printer on serial
|
||||||
|
|
||||||
#endif //__CONFIGURATION_PRUSA_H
|
#endif //__CONFIGURATION_PRUSA_H
|
||||||
|
Loading…
Reference in New Issue
Block a user