GithubHelp home page GithubHelp logo

Support for multiple I2C about xboot HOT 7 CLOSED

maziarzamani avatar maziarzamani commented on August 15, 2024
Support for multiple I2C

from xboot.

Comments (7)

alexforencich avatar alexforencich commented on August 15, 2024

Xboot only works as a slave. What do you need an I2C master for?

from xboot.

maziarzamani avatar maziarzamani commented on August 15, 2024

@alexforencich, i am using the TWI master to communicate with an IMU, while i use the slave to communicate with a main microcontroller. Basically my objective was to create a bootloader that i can use with Arduino in order to use following library for the invensense IMU: https://github.com/richards-tech/RTIMULib-Arduino

from xboot.

alexforencich avatar alexforencich commented on August 15, 2024

So what does that have to do with xboot? After the main program starts, you can do whatever you want with the serial interfaces.

from xboot.

maziarzamani avatar maziarzamani commented on August 15, 2024

So my question is if i can use this with Arduino IDE with multiple TWI ports?

from xboot.

alexforencich avatar alexforencich commented on August 15, 2024

Xboot supports bootloading via I2C. This is used when you have one or more microcontrollers on an I2C bus and you want to load new firmware on them over the I2C bus instead of individual serial ports. This can be useful if you have, say, a backplane board with several cards, each with a microcontroller, all of them connected to a master controller via I2C, and you want to update all the card firmware from the master controller.

If you are not using I2C to load the firmware, then you don't need to worry about this feature. Once the firmware is running, you can do whatever you want with the serial ports.

from xboot.

maziarzamani avatar maziarzamani commented on August 15, 2024

Exactly what i need. Will i be able to use the bootloader with Arduino IDE? My MCU has a external 16MHz crystal and when i attempted to create the bootloader i got following compile error:

make

-------- begin --------
avr-gcc (GCC) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Compiling: xboot.c
avr-gcc -c -mmcu=atxmega128a4u -I. -gstabs   -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -ffunction-sections -fdata-sections -fno-jump-tables -Wall -Wa,-adhlns=xboot.lst  -Wstrict-prototypes -std=gnu99 -MD -MP -MF .dep/xboot.o.d -DF_CPU=16000000L xboot.c -o xboot.o
In file included from xboot.c:34:0:
xboot.h:295:2: warning: #warning Not using predefined BAUD rate, possible BAUD rate error! [-Wcpp]
 #warning Not using predefined BAUD rate, possible BAUD rate error!
  ^
xboot.c: In function 'main':
xboot.c:107:10: error: #error F_CPU must match oscillator setting!
         #error F_CPU must match oscillator setting!
          ^
make: *** [xboot.o] Error 1

from xboot.

alexforencich avatar alexforencich commented on August 15, 2024

Well, if you want to upload via I2C with the IDE, then you're going to have to implement some sort of a bridge protocol that connects AVRdude on one side to xboot via I2C on the other side.

The default xboot files for xmega do not support an external oscillator, only the two internal oscillators. You have to switch to the external oscillator anyway in your main method after a power on reset, so I didn't see a compelling reason to support this in the bootloader. It should work fine to run the bootloader on the internal oscillator and then just switch to the external oscillator when your application starts. One of the advantages of doing this is that any issues with the external oscillator will not prevent the bootloader from running.

from xboot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.