Из той же книжки: BASEPRI A register of up to 8 bits (depending on the bit width implemented for priority level). It defines the masking priority level. When this is set, it disables all interrupts of the same or lower level (larger priority value). Higher priority interrupts can still be allowed. If this is set to 0, the masking function is disabled (this is the default).
Насчет сдвигов, по-моему, sysel не прав, и ничего сдвигать не нужно (потому и работает на любом процессоре, независимо от количества битов в регистрах приоритета): As with other priority-level registers, the formatting of the BASEPRI register is affected by the number of implemented priority register widths. For example, if only 3 bits are imple- mented for priority-level registers, BASEPRI can be programmed as 0x00, 0x20, 0x40 … 0xC0, and 0xE0
Посмотрел core_cm3.h на функции работы с приоритетами прерываний. Действительно, приоритеты записываются со сдвигом. Посмотрел в core_cm3.c на функции работы с BASEPRI. Сдвигов не видно. Что это, если не косяк программистов? "Моя твоя не понимай?"
|