Git Product home page Git Product logo

Comments (5)

JelmerT avatar JelmerT commented on May 22, 2024

When you're referring to restarting the chip, I'm presuming you mean restarting while it's running the flashed image. This might be difficult since you can only send a reset command when you're actually communicating with the bootloader (which has to be started manually).

If the hardware supports the RTS (serial pin) to RST (pin on the chip) mapping, then it wouldn't be too hard to add this I think.
How does the PIC on the Re-Mote handle the incoming RTS signal?

from cc2538-bsl.

niolp avatar niolp commented on May 22, 2024

Hi Jelmer.
Do you mean RTS pin on an FTDI232R device? Are there any other hardware considerations to make this work?
Regards

from cc2538-bsl.

JelmerT avatar JelmerT commented on May 22, 2024

@niolp yes the RTS on an FTDI or similar USB to serial chip. The idea is to connect the RTS or DTR of the serial line to the reset pin on the chip and be able to hard reset the chip that way. You can check the invoke_bootloader function for more details.

from cc2538-bsl.

Tanganelli avatar Tanganelli commented on May 22, 2024

Hi Jelmer,
I am using a zoul board and the contiki OS. I tried to define a reset function inspired by your invoke_bootloader. The following is the result:

`
class CommandInterface(object):
ACK_BYTE = 0xCC
NACK_BYTE = 0x33
def open(self, aport='/dev/tty.usbserial-000013FAB', abaudrate=500000):
self.sp = serial.Serial(
port=aport,
baudrate=abaudrate, # baudrate
bytesize=8, # number of databits
parity=serial.PARITY_NONE,
stopbits=1,
xonxoff=0, # enable software flow control
rtscts=0, # disable RTS/CTS flow control
timeout=0.5 # set a timeout value, None for waiting forever
)

def reset(self, dtr_active_high=False, inverted=False):
    if inverted:
        set_reset_pin = self.sp.setDTR
    else:
        set_reset_pin = self.sp.setRTS
    set_reset_pin(0)
    set_reset_pin(1)
    set_reset_pin(0)
    time.sleep(0.2)
    `

However, it doesn't work. Do you have any suggestion?

Regards
Giacomo

from cc2538-bsl.

JelmerT avatar JelmerT commented on May 22, 2024

I guess this feature was implemented a while ago. Needs HW support of course.
Closing!

from cc2538-bsl.

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.