All,
In mips/arch/hal_misc.c function hal_delay_us uses counter/compare in the
MIPS core. If a HAL would like to use a different timer this causes an
issue, due to how HAL_DELAY_US is defined.
Several options that I could see:
1) replace the assembly with #define for reading the timer
2) hal_intr.h move the #define
externC void hal_delay_us(int us);
#define HAL_DELAY_US(n) hal_delay_us(n)
into the CYGHWR_HAL_CLOCK_CONTROL_DEFINED and have the user supply the
function and macro
Enclosed is a fix for 1) is this ok? Is there another way?
Since the asm is essentially the definition of HAL_CLOCK_READ, I don't see
the problem. Applied (with val2 for the second as per your other mail).