I want to know that if I want to enable the MAM Function in lpc 2468 should i specify both the MAMTIM AND MAMCR registers or only MAMCR.
Is it necessary to specify MAMTIM along with MAMCR for enabling the working of MAM
MAM stands for Memory Accelerator Module .It is used to increase the performance of the controller.
MAMTIM: It means MAM timing register . Its reset value is 7.
MAMCR: It means MAM Control Register. Its reset value is 0.
yes it is necessary to specify both MAMTIM and MAMCR.
The value of MAMTIM and MAMCR has been specified in the startup file of the controller in
which MAMCR has a value of 2 and MAMTIM has a value of 4.
Related
I'm struggeling on setting up a STM32-F429ZI MCU (Nucleo 144 board) to generate following PWM pattern:
First channel with a variable frequency and 50% duty cycle - at least I've got this working -
Second channel giving a pulse with each 20th pulse of channel 1.
This is not primary a coding problem but a understanding problem of timer settings i guess (working with STM32CubeIDE). I would bet there is real simple solution...
I Think there is no way to do this with only 1 timer?
I'm pleased for any suggestion...
I already tried with TIM2 as clock source for TIM3 and 4 but couldn't manage to make them synchonize.
For better illustration of what I want to do:
I't not sure, if it could be done with two timer synchronization (the pitfall is variable frequency of the first timer). But you can use single timer+DMA to rewrite configuration of the second channel:
Create in-memory array of 20 values, where one value enables the second channel and other 19 disables it
Setup DMA to trigger on the timer update and to move data from the array to CCMRx (or CCRx) register. Of cource, DMA should be in circular mode
In my software I need to detect when an operator toggles one of two miniature toggle electric switches:
and which one.
I want to do this with as little external hardware as possible.
I was thinking that maybe I could use a USB to serial cable?
Looking at the WaitCommEvent documentation I notice that I can listen to for instance:
EV_CTS: The CTS (clear-to-send) signal changed state.
EV_DSR: The DSR
(data-set-ready) signal changed state.
Looking at the DB-9 pins:
It seems that I could connect a voltage source trough the toggle 1 to pin 8 (CTS) and to ground?
Likewise it seems that I could connect a voltage source trough the toggle 2 to pin 6 (DSR) and to ground?
Will this work? Is there a better way to do this only using a USB to serial cable?
For the sake of sparing you the work of reposting to the electronics exchange:
According to this document, setting CTS on means a voltage of at least +3V on the CTS line, relative to GND. Similarly, setting CTS off means a voltage of at least -3V on the CTS line, relative to GND. So you'd need two voltage sources, one for >+3V (GND to Serial GND) and one isolated one for <-3V (Plus to Serial GND).
DSR functions similarly, according to the document.
Also, your switch looks like an SPST. You'd need at least an SPDT for this if you want to avoid using resistors.
Please help to resolve one issue that I am facing with planning my TB.
Let’s assume my DUT has some input port which is parameter, something like:
module Multiplier #(parameter WIDTH = 8) (
input [WIDTH-1:0] addr,
Now I want my test to control this WIDTH parameter.
I want the test to randomize the WIDTH parameter, then apply that parameter to DUT. And based on that parameter value my whole testbench will be changed the transaction signals, driver, monitor and so on.
What is the best way to implement this parametric test?
I am thinking to have the WIDTH parameter in test class, and randomize it there. Then assign it to the DUT during instantiation. And for TB, put the randomize value in config_db and in agent get it and assign it to config class appropriate parameter.
Thanks
Hayk
I would generate a random variable in my Makefile (or whatever build/compilation system you are using). Then depending on your simulator, set the parameter from the simulation run command.
ModelSim:
The Parameters value can be passed with ‘vsim’ command in the ModelSim simulator. Assuming we want to supply a parameter value globally to all the modules:
-gWIDTH=<random_value>
VCS
-pvalue+hierarchical_name_of_parameter=<random_value>
All simulators have an equivalent.
I am using a Renesas RX62N; my screen uses ADC unit 1 and my code uses Unit 0.
Is it so that the two ADC units cannot work together? When I run the "ADC" and the "Display code" separately it works fine but as soon as I try to integrate them and get the ADC values on screen the variable stops to read!. Any solutions?
A quick look at the user manual indicates that you can use either the one 12 bit ADC or two 10 bit ADCs, but you cannot select the 10 and 12 bit ADCs simultaneously.
Thankyou all for your suggestions and time.
I was able to solve the issue. The problem as you pointed was that the 12 and the 10 bit adcs cannot work together and moreover all the channels in the 12bit are used up by my touchscreen. So by adding timers,delays and using DMAC I was able to finally get my ADC data to the display screen.
Regards
Ashish
I am trying to understand the fsa9485 driver(USB switch). there in dock initialization code I came across:
switch_dev_register(&switch_dock)
switch_dock is a structure of type switch_dev and in accessory detection routine it is used like:
switch_set_state(&switch_dock, attached)
I am inferring like : There are 2 types of dock one being car dock and other being desk dock and switch_dev class is for switching between them.
Why do we require switch_dev classes??. How that class differentiates between two different dock?
The switch_dev_register function registers a device with sysfs and creates files in /sys/. Switch_set_state updates the value in one of the created files on your running kernel (the state file). So in my kernel I can see the state by reading a file "/sys/devices/virtual/switch/dock/state." State is 1 for deskdock, 2 for cardock, and 0 otherwise. This is just a simple way of passing hardware information up to userspace.
It is necessary to use the switch_dev class for standardization in sysfs. The driver differentiates between the two docks by reading register values from the fsa9485 chip which resides on the I2C bus. See fsa9480_detect_dev in fsa9480.c where the driver reads values from an analog to digital converter (ADC) and a device type register to determine the type of dock.