Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI mode HOW TO documentation #209

Open
yashmulgaonkar opened this issue Dec 11, 2019 · 8 comments
Open

CLI mode HOW TO documentation #209

yashmulgaonkar opened this issue Dec 11, 2019 · 8 comments

Comments

@yashmulgaonkar
Copy link

In the file dps-model.h you mention:
you can see real ADC value in CLI mode's stat:

Is the documentation on how to use it available anywhere specifically for this firmware?

@yashmulgaonkar
Copy link
Author

@kanflo I am happy to tune the parameters for the DPS8005 and send in a PR once I know how to do the above...

@Xenoamor
Copy link
Contributor

Xenoamor commented Dec 11, 2019

I assume this is referring to the dpsctrl -cr command. Or maybe dpsctrl --screen settings and then dpsctrl -q

@yashmulgaonkar
Copy link
Author

yashmulgaonkar commented Dec 11, 2019

The line I'm referring to is this one:

* you can see real ADC value in CLI mode's stat:

Does the command you shared show the raw ADC values?
I'm trying to tune the constants for a DPS8005.

@Xenoamor
Copy link
Contributor

Yes, the calibration screen does. I'm away at the moment but I believe you press both the up and down arrow at the same time to get there (it's intentionally awkward)

@yashmulgaonkar
Copy link
Author

yashmulgaonkar commented Dec 11, 2019

Oh that was easier than I thought! Is there any documentation for this?
If not, I'm happy to contribute to a github.io page

@kanflo
Copy link
Owner

kanflo commented Dec 11, 2019

Weeeell, the documentation has somewhat fallen behind. Some of the information from my old blog posts are stil valid and some is obsolete. Recompiling them into a GitHub.io page has been on the todo list for quite some time. As always, contributions are welcome ;)

@yashmulgaonkar
Copy link
Author

yashmulgaonkar commented Dec 11, 2019

Can you share how you execute the following?
over openocd console: mww 0x40007408 77

as mentioned here:

* mww 0x40007408 77

Do we need the FTDI connected for this?
Or just open an openocd console in one window and in another terminal type the above command?

Does the DPS need to be in any particular state for this to work?

I tried the following:

  1. Run openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg in one terminal
  2. in new terminal, open telnet connection with telnet localhost 4444
  3. In telnet session, type mww 0x40007408 77

But the output never changes - its always = Vin. So I'm clearly missing something.

Next, I also tried:

  1. manually changing the values of Vout adc on the DPS calibration menu
  2. running ocd-client.py dac
  3. The value of DHR12R1 and DHR12L1 change accordingly, but Vout remains = Vin

@kanflo
Copy link
Owner

kanflo commented Dec 16, 2019

It seems you found the correct way to execute the openpcd commands. It is strange you don't see any difference when changing 0x40007408. Can you try changing output value in the UI and see what happens to that, and other registers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants