arduino / arduino/ArduinoModule-CMSIS-Atmel

BUG: samd51j19 incorrect NVIC Priority levels (is 2, should be 3)

Ouverte
#14 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
C
Étoiles
25
Forks
38
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

In the process of debugging a samd51j19 based system (Adafruit Feather Express M4) I noticed that the __NVIC_PRIO_BITS defined in the file CMSIS/Device/ATMEL/samd51/include/samd51j19a.h is (incorrectly) set to 2.

The official Microchip data sheet "SAM D5x/E5x Family Data Sheet (2019)" section 10.1.3 (pg 62) shows the number of priority levels is 3. Hence I believe the include file is wrong, and the definition should be:

`#define __NVIC_PRIO_BITS 3 /*!< Number of bits used for Priority Levels */`

On my physical devices, there certainly are 3 priority levels. Trying to run FreeRTOS, where 3 bits are used, on the same platform uncovered this. Using the CMSIS __NVIC functions to set priorities of interrupt handlers causes some challenges as you need to use levels numerically at or above 5 (101) for handlers calling into FreeRTOS -- and only one level (6) can effectively be assigned through the CMSIS functions (11...... -> 110.....).

Before/in parallel with creating a pull request, I wanted to check for any obvious things I may have missed?

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Commencez dans CMSIS/Device/ATMEL/samd51/include/samd51j19a.h et comparez __NVIC_PRIO_BITS avec la section 10.1.3 de la SAM D5x/E5x Family Data Sheet (2019). Le travail est terminé lorsque l’en-tête indique les trois bits de priorité documentés et que la modification a été vérifiée par rapport au comportement de priorité décrit de CMSIS et FreeRTOS.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
c
Domaine
embedded-iot
Type d'issue
Bug
Difficulté
1/5
Temps estimé
Moins d'une heure
Activité
À l'abandon
Clarté
Clairement spécifiée
Accessibilité débutants
48/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.