[riot-notifications] [RIOT-OS/RIOT] boards/common/nucleo32/include/arduino_pinmap.h not correct/complete (#12138)

マリウス notifications at github.com
Sun Sep 1 18:20:59 CEST 2019


#### Description

It looks like the `arduino_pinmap.h` in `boards/common/nucleo32/include/arduino_pinmap.h` is not quite correct or rather complete:

```
#define ARDUINO_PIN_0           GPIO_PIN(PORT_A, 10)
#define ARDUINO_PIN_1           GPIO_PIN(PORT_A, 9)
#define ARDUINO_PIN_2           GPIO_PIN(PORT_A, 12)
#define ARDUINO_PIN_3           GPIO_PIN(PORT_B, 0)
#define ARDUINO_PIN_4           GPIO_PIN(PORT_B, 7)
#define ARDUINO_PIN_5           GPIO_PIN(PORT_B, 6)
#define ARDUINO_PIN_6           GPIO_PIN(PORT_B, 1)
#if defined(CPU_MODEL_STM32L031K6)
#define ARDUINO_PIN_7           GPIO_PIN(PORT_C, 14)
#define ARDUINO_PIN_8           GPIO_PIN(PORT_C, 15)
#else
#define ARDUINO_PIN_7           GPIO_PIN(PORT_F, 0)
#define ARDUINO_PIN_8           GPIO_PIN(PORT_F, 1)
#endif
```

The pins defined in `#if defined(CPU_MODEL_STM32L031K6)` seem to be that way for other boards (e.g. the L432KC) as well. I tried using `ARDUINO_PIN_7` on L432KC just now, resulting in this output:

```
   r0: 0x00000004                                        
   r1: 0x00000023                                        
   r2: 0x40021000                                        
   r3: 0x00000003                                        
  r12: 0x00000000                                        
   lr: 0x0800098d                                        
   pc: 0x08000992                                        
  psr: 0x01000000                                        
                                                         
FSR/FAR:                                                 
 CFSR: 0x00008200                                        
 HFSR: 0x40000000                                        
 DFSR: 0x00000008                                        
 AFSR: 0x00000000                                        
 BFAR: 0x48001400                                        
Misc                                                     
EXC_RET: 0xffffffed                                      
Attempting to reconstruct state for debugging...         
In GDB:                                                  
  set $pc=0x8000992                                      
  frame 0                                                
  bt                                                     
                                                         
ISR stack overflowed by at least 16 bytes.               
main(): This is RIOT! (Version: 2019.10-devel-406-g91361)
```

However, when I manually set the pins to the same values as for the `CPU_MODEL_STM32L031K6` it seems to work just fine.

I can create a PR, however maybe someone could check if my assumption is right first? Also I'm not sure for which other models this might be true - my naive guess is that for at least the ones with the same form factor as the `CPU_MODEL_STM32L031K6`. 🤷‍♂ 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/issues/12138
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190901/0f58c2c4/attachment.htm>


More information about the notifications mailing list