2015-04-26 08:59 PM
Few things I've found with the Cube Generator app V4.7.0:
- in the I2C configuration section, the maximum clock speed is 100 khz, even if Fast Mode is selected. Can't select 400 khz- in the LwIP options, it seems that the LWIP_STATS parameter is backwards. Setting to Enabled will disable stats. Setting Disabled enables stats- could you guys please add some more User code blocks inside ethernetif.c and lwip.c, to allow the user to easily change the IP address and MAC address. E.g. set the default values, then add a User block before they are used, so we can hook in there and change the values.Thanks.2015-05-13 05:26 AM
Hello,
The I2C issue is fixed for next release version 4.8 coming out this month. Regarding your remarks on LwIP: - user sections are already available in both files and are delimited thanks to USER CODE BEGIN and END tags. Can you tell us if you miss a user section a specific place in the code? - the LWIP_STATS is enabled and set to 1 by default in the opt.h file. The other STATS parameters have been corrected for next CubeMX 4.8 release and are now in line with LWIP_STATS value. - Regarding MAC and IP addresses: configure the MAC address within the Ethernet configuration window and the IP address within LwIP window (disable DHCP for the IP address to appear as a configuration parameter) Best regards2015-08-04 07:10 PM
As a follow-on to this request, it seems as if it is overly difficult to dynamically assign a MAC address in user code. the function low_level_init takes a hard coded MAC and puts it into MACAddr and then shortly afterwards takes this and copies it to netif->hwaddr. it would be useful to be able to dynamically replace this array with another MAC.
maybe have a section of user code within this function so we can place a desired MAC in either of these locations without the code being overwritten by STM32Cube. or make the use of the hardcoded MAC only with a option flag and make MACAddr global. any number of ways to accomplish this. Thanks