Skip to content

Commit

Permalink
Fix timer setup for AT90CAN devices
Browse files Browse the repository at this point in the history
  • Loading branch information
Lars Sønderby Jessen committed Jun 6, 2019
1 parent e53413b commit 1be6dee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/at90canbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ AvrDevice_at90canbase::AvrDevice_at90canbase(unsigned ram_bytes,

inputCapture1 = new ICaptureSource(PinAtPort(&portd, 4));
timer1 = new HWTimer16_3C(this,
new PrescalerMultiplexer(&prescaler013),
new PrescalerMultiplexerExt(&prescaler013, PinAtPort(&portd, 6)),
1,
timerIrq1->getLine("TOV1"),
timerIrq1->getLine("OCF1A"),
Expand Down Expand Up @@ -303,6 +303,7 @@ AvrDevice_at90canbase::AvrDevice_at90canbase(unsigned ram_bytes,
/* 0x76-0x77 reserved */
/* 0x74-0x75 External memory control registers TODO */
/* 0x72-0x73 reserved */
rw[0x71] = & timerIrq3->timsk_reg;
rw[0x70]= & timerIrq2->timsk_reg;
rw[0x6F]= & timerIrq1->timsk_reg;
rw[0x6E]= & timerIrq0->timsk_reg;
Expand Down
2 changes: 1 addition & 1 deletion src/at90canbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class AvrDevice_at90canbase: public AvrDevice {
HWPort portg; //!< port G
IOSpecialReg gtccr_reg; //!< GTCCR IO register
IOSpecialReg assr_reg; //!< ASSR IO register
HWPrescaler prescaler013; //!< prescaler unit for timer 0 and 1
HWPrescaler prescaler013; //!< prescaler unit for timer 0, 1 and 3
HWPrescalerAsync prescaler2; //!< prescaler unit for timer 2
ExternalIRQHandler* extirq01; //!< external interrupt support for INT0, INT1, INT2, INT3, INT4, INT5, INT6, INT7
IOSpecialReg* eicra_reg; //!< EICRA IO register
Expand Down

0 comments on commit 1be6dee

Please sign in to comment.