Dependency between usb_lld.c and rt Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
neums
Posts: 137
Joined: Fri May 08, 2015 1:09 pm
Location: Dresden, Germany
Has thanked: 10 times
Been thanked: 5 times

Dependency between usb_lld.c and rt

Postby neums » Thu Jun 16, 2016 9:06 am

Hi,
usb_lld.c uses the CORTEX_PRIO_MASK() macro which is part of chcore_v7m.h. Is it better to use an osal function/macro there?

By the way, in the os-less osal the function __set_BASEPRI is used without the CORTEX_PRIO_MASK or the NVIC_PRIORITY_MASK. So it will not has any effect to the basepri when

Code: Select all

__set_BASEPRI(OSAL_IRQ_MAXIMUM_PRIORITY);

is called in the osalSysLock(void) function due to the number of implemented priority bits.

Maybe it is better to change this to something like:

Code: Select all

static inline void osalSysLock(void) {

#if CORTEX_MODEL == 0
  __disable_irq();
#else
  __set_BASEPRI(NVIC_PRIORITY_MASK(OSAL_IRQ_MAXIMUM_PRIORITY));
#endif
}


But than we have to include the nvic.h in the osal.h and not in the hal_lld.h (line 1146).

Thanks

User avatar
Giovanni
Site Admin
Posts: 14457
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Dependency between usb_lld.c and rt  Topic is solved

Postby Giovanni » Tue Jul 26, 2016 11:04 am

Bumping this.

Giovanni


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 67 guests