This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi Folks Attached is a patch which extends the AT91 varient HAL. The newer AT91 devices have a system controller. This contains a number of new devices: A simple UART designed specifically for debugging Periodic Interval Timer designed to provide the OS tick Watchdog timer Reset Controller Power Management controller A Real Time Timer For a start this patch adds register definitions of these new devices. The patch also adds support for the debug serial port. Via CDL this device can be used for hal diag instead of using the AT91 USARTs. (I've not tested ^C support, so it might not work). Similarly, via CDL it is possible to use the Periodic Interval Timer to generate the eCos tick instead of using a Timer Counter. When this option is enabled hal_delay_us also uses the PIT so saving another TC. By default the old behaviour is retained, so you need to specifically enable these new features if you want to use them. The specific HAL must also implement the require interface to indicate the chip has the necassary hardware. The devices in the system controller all share one interrupt in the Advanced Interrupt Controller. So i've added code to demultiplex this interrupt into an interrupt per device. What is not nice is that there is no easy way to determine which device in the system controller caused the interrupt so it is necassary to check each device in turn to find the once which caused the interrupt. Since there is no second level interrupt controller it is also not possible to disable/enable individual interrupts. So when you mask one of these interrupts by calling hal_interrupt_mask() it actually masks the whole system controller. So you have to take this into account when writing device drivers for the system controller devices. This is only compiled if CYGINT_HAL_ARM_AT91_SYS_INTERRUPT is defined so older targets won't get it. If the reset controller exists this will be used to implement hal_at91_reset_cpu() rather than using the watchdog. The watchdog in the system controller is different to the watchdog in older devices so the old code does not work with the new watchdog controller. Some of this code is by Oliver Munz. Thanks Oliver. Andrew
Attachment:
hal.arm.at91.var.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |