6 years, 2 months ago.

I2c Touchscreen vs CAN1 problem

Touchscreen and CAN not compatible. Actually in this board there is only one usable CAN (CAN1), but the pin are used by the I2C for the touchscreen. Can you please allow the use of the second CAN on the connector cn12 please.

Question relating to:

The STM32F469 Discovery kit (32F469IDISCOVERY) allows users to easily develop applications with the STM32F469 high-performance MCUs with ARM®Cortex®-M4 core and Chrom-ART Accelerator™.

1 Answer

6 years, 2 months ago.

Hello, I agree with your request. We will add those missing pins soon.

Thank you for your remark. Kind regards

Accepted Answer

Pull request is posted in mbed (https://github.com/ARMmbed/mbed-os/pull/3369), you will be able to have this code available once it will be merged.

posted by Armelle DubocST 05 Dec 2016

There is a problem the can2(PB_5,PB_13) works only if you declare first the can1(PB_8,PB_9). And unfortunately Can1(PB_8,PB_9) is used by the touchscreen I2C. Is it possible to resolve this bug?

  1. include "mbed.h"

void canRx_ISR (void);

Ticker ticker; DigitalOut led1(LED1); DigitalOut led2(LED2); CAN can1(PB_8, PB_9); CAN can2(PB_5, PB_13); char counter = 0;

CANMessage trame_Tx;

void send() { printf("send()\n"); if(can2.write(trame_Tx)) { printf("wloop()\n"); counter++; printf("Message sent: %d\n", counter); } led1 = !led1; }

int main() { printf("main()\n"); can2.frequency(1000000); fréquence de travail 1Mbit/s trame_Tx.id = 0x603; trame_Tx.len = 1; trame_Tx.format = CANStandard; trame_Tx.type = CANData; trame_Tx.data[0] = 0x1;

ticker.attach(&send, 1); CANMessage msg; while(1) { printf("loop()\n"); if(can2.read(msg)) { printf("Message received: %d\n", msg.data); } wait(0.2); } }

comment can1 on the code and the network don't work (message is sent but is whatever)

posted by bruno LARNAUDIE 28 Feb 2017