I am trying to get an SPI based EPaper board to work with the Portenta + Vision shield.
I am using the H7 core and SPI1 along with digital pins D2-D5
Having some challenges and wondered if there were any pins on the low density header that were shared with the shield?
One of my symptoms was the red Led flashing with what seems to be a code.
Found out about the flashing red light on this thread.
opened 08:12AM - 23 Feb 21 UTC
topic: firmware
type: support
Hello! I'm trying to receive CAN frames with the Portenta and the [MKR CAN shiel… d](https://store.arduino.cc/arduino-mkr-can-shield) using this library. However, I'm not able to receive anything. I'm trying the CAN sniffer example. The code compiles, but I do not see any data in the serial terminal. I visualize the CAN frame in an oscilloscope and it seems to be fine. Any idea why it might not be working?
Update: I noticed that once the CAN frame starts to arrive to the Portenta, it enters in some sort of error mode (the RGB LED starts to blink in red). I even tried the loopback example without any physical CAN bus connected to the Portenta, and it keeps crashing.
I found the schematic for the vision shield particularly hard to read, it has stuff crossed out etc, so Massimo pointed me at the pinout docs. I cross checked the pins Vs those on the low density headers, just the I2C pins are shared, D11 and D11.
My trouble turned out to be driver/code related and nothing to do with the shield or SPI.
For more on SPI see Minimal example of SPI for Portenta H7 · Issue #131 · arduino/ArduinoCore-mbed · GitHub
After further experimentation / digging I discovered that as well as these 2 pins, D1 aka PK1 aka PWM5 is also used by the camera code to implement a timer.
Also couple of analogue pins used:
PA4 / A6
PA6 / A7
See
#include "Arduino.h"
#include "pinDefinitions.h"
RTC_HandleTypeDef RTCHandle;
AnalogPinDescription g_AAnalogPinDescription[] = {
{ PA_0C, NULL }, // A0 ADC2_INP0
{ PA_1C, NULL }, // A1 ADC2_INP1
{ PC_2C, NULL }, // A2 ADC3_INP0
{ PC_3C, NULL }, // A3 ADC3_INP1
{ PC_2_ALT0, NULL }, // A4 ADC1_INP12
{ PC_3_ALT2, NULL }, // A5 ADC2_INP13
{ PA_4, NULL }, // A6 ADC1_INP18
{ PA_6, NULL } // A7 ADC1_INP7
};
PinDescription g_APinDescription[] = {
// D0 - D7
{ PH_15, NULL, NULL, NULL }, // D0
{ PK_1, NULL, NULL, NULL }, // D1
This file has been truncated. show original
and
#include "Arduino.h"
#include "himax.h"
#include "camera.h"
#include "stm32h7xx_hal_dcmi.h"
#define CAMERA_FRAME_BUFFER 0xC0200000
#define ARGB8888_BYTE_PER_PIXEL 4
static const int CamRes[][2] = {
{160, 120},
{320, 240},
{320, 320},
};
static __IO uint32_t camera_frame_ready = 0;
static md_callback_t user_md_callback = NULL;
/* DCMI DMA Stream definitions */
#define CAMERA_DCMI_DMAx_CLK_ENABLE __HAL_RCC_DMA2_CLK_ENABLE
#define CAMERA_DCMI_DMAx_STREAM DMA2_Stream3
This file has been truncated. show original
1 Like
system
Closed
January 1, 2022, 11:26pm
4
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.