This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Can I use the I2C to load a program for the nrf52832?

I want to put the BLE program to the firmware of another STM chip and load the program via the I2C to the nrf52832. Will it work? If yes, is there any tutorial or example that I can read?

Thanks in advance. 

Parents
  • No it won't work - well it'll work if you write your own loader program which receives the data over I2C but there's no built-in support for it nor any example I've seen which does this. There used to be a bootloader over UART example, but I'm not even sure if that's up to date any more as most people want to use bluetooth to upload firmware. 

  • Hi RK,

    Thank you for your answer. I find that there are special pins for SWD, will it be a good choice? and I would like to hear your suggestions.

    Thanks a lot.

    Duncan

Reply
  • Hi RK,

    Thank you for your answer. I find that there are special pins for SWD, will it be a good choice? and I would like to hear your suggestions.

    Thanks a lot.

    Duncan

Children
  • Duncan Xu said:
    there are special pins for SWD, will it be a good choice

    Could you please rephrase this? Do you want to program the nrf52 via the SWD pins?

  • Yes, that is exactly what I mean.

  • well you  can do that - it won't be easy - you'll need to speak SWD protocol to the chip. If you really are going to go that way I'd suggest starting with the freely available CMSIS-DAP implementation of the SWD protocol, just rip out the USB front end and take the actual driver portion. You're going to have to understand a lot about SWD to make this work. 

  • It sounds like having lots of work to do but my time is tight. You mentioned the Bluetooth method at the early reply, would it be easier and quicker?

    Thank you. 

  • That  would be easier and quicker if you load your firmware onto the nRF chip from a 3rd device like a phone, you can't use the STM chip for that because it doesn't talk bluetooth. 

    Perhaps it's  better at this point if you explain what it is you're actually trying to do, why you have a Nordic chip and an STM chip and how they are supposed to interact.