Skip to main content
Graduate
June 10, 2025
Solved

Nucleo-C071RB (MB2046B) vs custom board

  • June 10, 2025
  • 3 replies
  • 560 views

Hi,

I have a question that might be helpful for many others as well.

I am currently using the MB2046B development board, which features the STM32C071RB microcontroller, along with STM32CubeMX for code generation.

I also have a custom board that uses the STM32C071CBT6 microcontroller.

Will the same code developed for the MB2046B board (with STM32C071RB) work on my custom board that uses the STM32C071CBT6?

if Not can you please tell me the Why it not works for instant we forgrt about the pins 

    This topic has been closed for replies.
    Best answer by Andrew Neil

    So, yes - that should work.

    3 replies

    Super User
    June 10, 2025

    STM32C071RB vs STM32C071CBT6:

    AndrewNeil_0-1749544306395.png

    https://www.st.com/resource/en/datasheet/stm32c071rb.pdf#page=128

    via: https://www.st.com/en/microcontrollers-microprocessors/stm32c071rb.html

     

    So the only difference is in the number of pins on the package.

    Therefore, so long as you restrict yourself to things which are available on both packages, the same code can run on both.

     

    PS:

    Of course, you will also have to ensure that your custom board has compatible hardware in corresponding places to the Nucleo.

    Technical Moderator
    June 10, 2025

    Hello @curiocity ,

    You should consider the hardware differences and check the pin mapping.

    The STM32C071CBT6 (LQFP48 package) has fewer pins than the STM32C071RB (LQFP64 package).

    If your code uses GPIO pins that are not available on the STM32C071CBT6, you will need to remap or modify your code accordingly. So, I recommend verifying the pinout in STM32CubeMX and ensure that all peripherals (e.g., UART, I2C, SPI, ADC) are mapped to pins that exist on the STM32C071CBT6.

    Also, check the clock settings.

    Super User
    June 10, 2025

    @curiocity wrote:

    Will the same code developed for the MB2046B board (with STM32C071RB) work on my custom board that uses the STM32C071CBT6?


    it also depend on what you mean by "the same code".

    If you mean the exact same binary - so with no need to recompile for the different boards - then you would need to ensure that all the pin assignments are identical.

    But it is also possible to have a single set of code with compile-time options, so that it can be built for either board - giving you a different binary for each board. This gives you more flexibility in pin assignments, but means you have to manage the two variants.

    curiocityAuthor
    Graduate
    June 16, 2025

    Hi Andrew and Imen,

    Thank you both for your responses.

    Let me provide a bit more context. I am currently using a development board (MB2046B) with an STM32C071RB, which is a 64-pin microcontroller. However, I intend to deploy the code on an STM32C071CB, which has 48 pins. To handle this, I have ensured that I am only using the pins common to the STM32C071CB by referencing its available pin names while developing on the STM32C071RB.

    I generated the code and implemented the application layer accordingly. So, from a pin usage standpoint, I have limited everything to what the STM32C071CB supports.

    My main question is: Will this code work as expected on the STM32C071CB? I am asking because I originally created the project by selecting the NUCLEO-64 board. Now that I plan to run the same code on a custom board with the STM32C071CB, I want to confirm if this approach is valid.

    Please note: you can ignore pin mapping concerns — I have made sure all the pin selections are correct for the 48-pin device.

     

    Super User
    June 16, 2025

    So, yes - that should work.