Giter Club home page Giter Club logo

Comments (4)

JeremyGrosser avatar JeremyGrosser commented on May 30, 2024 1

No problem at all!

The screenshot is from PulseView, a Qt based frontend for the Sigrok project, which supports a lot of different hardware analyzers.

I'm using a board based on the Cypress FX2 chip, you can find them on eBay or AliExpress for $10 USD.

The whole thing is a bit unstable... My analyzer won't trigger properly with sample rates >4 MHz and PulseView crashes occasionally, but when it works, it's quite nice.

from rp2040_hal.

JeremyGrosser avatar JeremyGrosser commented on May 30, 2024

I'm not able to reproduce this issue. Here's the test code I'm using:

with RP.Device;
with RP.Clock;
with RP.GPIO;
with RP.I2C_Master;
with Pico;
with HAL.I2C;
with HAL; use HAL;

procedure Eeprom is
   use RP.GPIO;
   use HAL.I2C;

   SCL  : GPIO_Point renames Pico.GP15;
   SDA  : GPIO_Point renames Pico.GP14;
   Port : RP.I2C_Master.I2C_Master_Port renames RP.Device.I2CM_1;
   Addr : constant I2C_Address := 2#1010_000_0#;

   Data   : I2C_Data (1 .. 32) := (others => 1);
   Status : I2C_Status;
begin
   RP.Clock.Initialize (Pico.XOSC_Frequency);
   RP.Clock.Enable (RP.Clock.PERI);
   Pico.LED.Configure (Output);
   Pico.LED.Clear;

   SCL.Configure (Output, Pull_Up, RP.GPIO.I2C, Schmitt => True);
   SDA.Configure (Output, Pull_Up, RP.GPIO.I2C, Schmitt => True);
   Port.Configure (Baudrate => 400_000);

   RP.Device.Timer.Enable;

   loop
      Data := (others => Data (1) + 1);
      Port.Mem_Write
         (Addr          => Addr,
          Mem_Addr      => 0,
          Mem_Addr_Size => Memory_Size_16b,
          Data          => Data,
          Status        => Status,
          Timeout       => 1000);
      RP.Device.Timer.Delay_Milliseconds (5);
      Port.Mem_Read
         (Addr          => Addr,
          Mem_Addr      => 0,
          Mem_Addr_Size => Memory_Size_16b,
          Data          => Data,
          Status        => Status,
          Timeout       => 1000);
      RP.Device.Timer.Delay_Milliseconds (5);
      if Status = Ok then
         Pico.LED.Set;
      end if;

      RP.Device.Timer.Delay_Seconds (1);
   end loop;
end Eeprom;

The Mem_Read transaction looks like this:
Screenshot 2022-11-14 11 43 12

from rp2040_hal.

hgrodriguez avatar hgrodriguez commented on May 30, 2024

I hope we are using the very same version (from my alire.toml):
[[depends-on]]
pico_bsp = "^2.0.0"

from rp2040_hal.

hgrodriguez avatar hgrodriguez commented on May 30, 2024

I do confirm, that your example works, therefore please close the ticket, looks like my code is not OK. Sorry to waste your time. BTW: I like your logic analyzer view, which model is this?

from rp2040_hal.

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.