I just finished the design of a vision system for industrial application. The system is designed to work as an auxiliary system for the machine that we are producing and selling worldwide.
Today I received the news of the next release of H7 version and I am quite concerned about the discontinuing of M7 support and availability on the market.
Do you have any information about that?
One more question: will H7 be compatible with M7 script and feature? I am using CAN interface to connect 30 CAM to a computer, will CAM bus be available on the H7 version?
Hi, the M7 and H7 are 100% compatible with each other. They are both built by ST and feature the same processor core. One is just fancier. The pheripals are all the same. With the H7 you’ll just have a magic 2x speed boost. No work on your part will be required. Both versions also have the same amount of flash so the feature set will be exactly the same.
We plan to have M7 availability for the foreseeable future. We’re not done with getting all sensors working with the H7 yet. Until then, we can’t even start the Kickstarter, after the Kickstarter, we’ll then go to manufacturing. This whole process is going to take a few months.
…
As for CAN. Yes, it has hardware support for this designed for automotive applications. However, neither me nor Ibrahim are experts in CAN. We’d love some community effort to help make the CAN pheripal more useful. Note that MicroPython already supplies some code to get the CAN interface working… However, I don’t know what exactly to do with it.
If you’re good with C we could make some money available for doing some documentation on the CAN interface and making it more obvious. There’s already code to start with. So, only minimal effort is needed to figure out the right way to use it.
This is taken right out of an example project From the STM32F arm.
/* Project name:
CAN_1st (CAN Network demonstration with mikroE's CAN-1 module)
* Copyright:
(c) MikroElektronika, 2012.
* Revision History:
20110511(TL):
- initial release;
* Description:
This code demonstrates how to use CAN library functions and procedures.
It is used together with the CAN_2nd example (on second MCU), and it can
be used to test the connection of MCU to the CAN network.
This node initiates the communication with the 2nd node by sending some
data to its address. The 2nd node responds by sending back the data incre-
mented by 1. This (1st) node then does the same and sends incremented data
back to 2nd node, etc.
With minor adjustments, it should work with any other MCU that has a CAN module.
* Test configuration:
MCU: STM32F107VC
http://www.st.com/st-web-ui/static/active/en/resource/technical/document/datasheet/CD00220364.pdf
Dev.Board: EasyMx PRO v7 for STM32(R) ARM(R)
http://www.mikroe.com/easymx-pro/stm32/
ac:CAN
Oscillator: HSE-PLL, 72.000MHz
Ext. Modules: None.
SW: mikroC PRO for ARM
' http://www.mikroe.com/mikroc/arm/
* NOTES:
- Turn on PORTE LEDs at SW10 and turn on CAN RX and TX switches at SW12.
*/
unsigned long Can_Init_Flags;
unsigned char Can_Send_Flags, Can_Rcv_Flags; // can flags
unsigned char Rx_Data_Len; // received data length in bytes
char RxTx_Data[8]; // can rx/tx data buffer
char Msg_Rcvd; // reception flag
const long ID_1st = 12111, ID_2nd = 3; // node IDs
long Rx_ID;
void main() {
GPIO_Digital_Output(&GPIOE_BASE, 0xFF00);
GPIOE_ODR = 0;
Can_Init_Flags = 0; //
Can_Send_Flags = 0; // clear flags
Can_Rcv_Flags = 0; //
Can_Send_Flags = _CAN_TX_XTD_FRAME & // with CANWrite
_CAN_TX_NO_RTR_FRAME;
Can_Init_Flags = _CAN_CONFIG_AUTOMATIC_RETRANSMISSION & // form value to be used
_CAN_CONFIG_RX_FIFO_NOT_LOCKED_ON_OVERRUN & // with CANInit
_CAN_CONFIG_TIME_TRIGGERED_MODE_DISABLED &
_CAN_CONFIG_TX_FIFO_PRIORITY_BY_IDINTIFIER &
_CAN_CONFIG_WAKE_UP;
CAN1InitializeAdvanced(1,5,4,4,1,Can_Init_Flags, &_GPIO_MODULE_CAN1_PD01); // Initialize CAN module
CAN1SetOperationMode(_CAN_OperatingMode_Initialization); // set CONFIGURATION mode
CANSetFilterScale32(0, _CAN_FILTER_ENABLED & _CAN_FILTER_ID_MASK_MODE & _CAN_FILTER_XTD_MSG, ID_2nd, -1);
CAN1SetOperationMode(_CAN_OperatingMode_Normal); // set NORMAL mode
RxTx_Data[0] = 9; // set initial data to be sent
CAN1Write(ID_1st, RxTx_Data, 1, Can_Send_Flags); // send initial message
while(1) { // endless loop
Msg_Rcvd = CAN1Read(0, &Rx_ID , RxTx_Data , &Rx_Data_Len, &Can_Rcv_Flags); // receive message
if ((Rx_ID == ID_2nd) && Msg_Rcvd) { // if message received check id
GPIOE_ODR = RxTx_Data[0] << 8; // id correct, output data at PORTE
RxTx_Data[0]++ ; // increment received data
Delay_ms(10);
CAN1Write(ID_1st, RxTx_Data, 1, Can_Send_Flags); // send incremented data back
}
}
}