Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EA Timers #544

Open
Taragorm opened this issue Aug 16, 2024 · 2 comments
Open

EA Timers #544

Taragorm opened this issue Aug 16, 2024 · 2 comments

Comments

@Taragorm
Copy link

A couple of timer related issues (not sure if I should open two issues here, or not)

1] We don't seem to have an option for using the RTC for millis(). Unclear if this is a deliberate omission, as we obviously have an RTC, and other parts have used this.

2] ioavr64ea32.h [and likely others] don't define TCA1 or TCB3. This is Microchip supplied, I guess, but maybe in need of a patch. I downloaded the latest, but it still seems to be broken. What's the usual way to handle this? Without the #defines you can't use the timers as a millis() source.

@Taragorm
Copy link
Author

:(
Even if you patch the header so TCA1 and TCB3 are mapped as per the datasheet, it doesn't seem to work. Almost as if the headers are right and the timers either don't work, or don't exist.

Bit of a problem as I need those timers.

I'm just going to park this unless anyone requests further testing, and redesign around an ATMega4809 part, which fortunately, I can do.

@SpenceKonde
Copy link
Owner

#define TCA0                  (*(TCA_t *) 0x0A00) /* 16-bit Timer/Counter Type A */
#define TCB0                  (*(TCB_t *) 0x0B00) /* 16-bit Timer Type B */
#define TCB1                  (*(TCB_t *) 0x0B10) /* 16-bit Timer Type B */
#define TCB2                  (*(TCB_t *) 0x0B20) /* 16-bit Timer Type B */
#define SYSCFG             (*(SYSCFG_t *) 0x0F00) /* System Configuration Registers */
#define NVMCTRL           (*(NVMCTRL_t *) 0x1000) /* Non-volatile Memory Controller */
#define LOCK                 (*(LOCK_t *) 0x1040) /* Lockbits */
#define FUSE                 (*(FUSE_t *) 0x1050) /* Fuses */
#define USERROW           (*(USERROW_t *) 0x1080) /* User Row */
#define SIGROW             (*(SIGROW_t *) 0x1100) /* Signature row */

vs

#define TWI0                  (*(TWI_t *) 0x0900) /* Two-Wire Interface */
#define SPI0                  (*(SPI_t *) 0x0940) /* Serial Peripheral Interface */
#define TCA0                  (*(TCA_t *) 0x0A00) /* 16-bit Timer/Counter Type A */
#define TCA1                  (*(TCA_t *) 0x0A40) /* 16-bit Timer/Counter Type A */
#define TCB0                  (*(TCB_t *) 0x0B00) /* 16-bit Timer Type B */
#define TCB1                  (*(TCB_t *) 0x0B10) /* 16-bit Timer Type B */
#define TCB2                  (*(TCB_t *) 0x0B20) /* 16-bit Timer Type B */
#define TCB3                  (*(TCB_t *) 0x0B30) /* 16-bit Timer Type B */

OOOFFF!!! did they cut the TCA1 and TCBs? If so, that was omne of the most appea;omg things about them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants