Psychological factors — Psychological issues such as depression, anxiety, guilt or fear can sometimes cause sexual problems. At one time, these factors were thought to be the major cause of impotence. Doctors now know that physical factors cause impotence in most men with the problem. However, embarrassment or "performance anxiety" can make a physical problem worse.
What’s important to take away from this is that, because erections can occur throughout the day for no reason, erectile dysfunction can be difficult to diagnose. Some men achieve erections for no reason, yet when provided with stimuli, they aren’t able to. Some men, on the other hand, only get aroused when directly stimulated. This means that healthcare professionals need to take into account many variables prior to diagnosing and treating erectile dysfunction.
Damage to the autonomic pathways innervating the penis may eliminate "psychogenic" erection initiated by the central nervous system. Lesions of the somatic nervous pathways may impair reflexogenic erections and may interrupt tactile sensation needed to maintain psychogenic erections. Spinal cord lesions may produce varying degrees of erectile failure depending on the location and completeness of the lesions. Not only do traumatic lesions affect erectile ability, but disorders leading to peripheral neuropathy may impair neuronal innervation of the penis or of the sensory afferents. The endocrine system itself, particularly the production of androgens, appears to play a role in regulating sexual interest, and may also play a role in erectile function.
You get to decide what is normal for you. That might include him still experiencing pleasure from you touching his penis even if he’s not hard. Some men can still orgasm without an erection. Or he may prefer not to have any touching while he is dealing with his erection problems. It is okay for you to orgasm even if he doesn’t. Reading about what might bring you pleasure, or considering how you think about sex can make this something enjoyable to explore together.
Additionally, the physiologic processes involving erections begin at the genetic level. Certain genes become activated at critical times to produce proteins vital to sustaining this pathway. Some researchers have focused on identifying particular genes that place men at risk for ED. At present, these studies are limited to animal models, and little success has been reported to date.  Nevertheless, this research has given rise to many new treatment targets and a better understanding of the entire process.
A semi-firm penis if correctly handled can give a somewhat pleasant orgasm. I really don't think there is such a thing as an unpleasant orgasm though. I have have ED for two years. It has been than long since I had sex with my wife in her vagina. There has been plenty of oral sex for her. The ED drugs do not work with me. I take injectable Testosterone, and that does not make a big difference. About twice a month I am able to masturbate. Hey I am glad to know it still works. Next week I am going to see urologist number 2. The first one was a jerk and basically wrote me off because of my age. Now I have read about the Viberect device and the NEW pudendal artery (to the penis). There is hope, but in the mean time I will masturbate as often as I can.
PDE5 inhibitors, the primary second-line therapy, have been the mainstay of ED treatment since the release of sildenafil (Viagra) in 1998, with the subsequent development of many others, and still more in the development stage. These medications do improve erectile quality for the majority of men, and they work by enhancing blood flow in the corpora cavernosa. These medications are generally used on demand and need to be taken about an hour before sexual intimacy. Tadalafil (Cialis) is longer acting and does come in a daily preparation potentially eliminating the ‘on-demand’ need. The daily dosing of tadalafil, 2.5–5 mg\day, has also been approved by the FDA for treatment of symptoms of BPH.41 PDE5 inhibitors are contraindicated in men taking nitrates, but otherwise PDE5 inhibitors are very safe and effective. When PDE5 inhibitors are coadministered with nitrates, pronounced systemic vasodilation and severe hypotension are possible. Many patients with ED are elderly and have the same risk factors as patients with CAD, so these drug combinations are commonly considered or encountered in clinical practice.42
You should talk to your doctor about possible treatments. You may want to talk to other patients who have had the treatment planned for you. You also may want to seek a second doctor's opinion about surgery before making your decision. You may find it difficult to talk to your doctor about impotence. You will want to find a doctor who treats this condition and will help you feel comfortable talking about the problem and choosing the best treatment. You can also get more information by contacting your local National Kidney Foundation affiliate.
Circulatory problems: An erection occurs when the penis fills with blood and a valve at the base of the penis traps it. Diabetes, high blood pressure, cholesterol, clots, and atherosclerosis (hardening of the arteries) can all interfere with this process. Such circulatory problems are the number one cause of erectile dysfunction. Frequently, erectile dysfunction is the first noticeable symptom of cardiovascular disease.
Under normal circumstances, when a man is sexually stimulated, his brain sends a message down the spinal cord and into the nerves of the penis. The nerve endings in the penis release chemical messengers, called neurotransmitters, that signal the corpora cavernosa (the two spongy rods of tissue that span the length of the penis) to relax and fill with blood. As they expand, the corpora cavernosa close off other veins that would normally drain blood from the penis. As the penis becomes engorged with blood, it enlarges and stiffens, causing an erection. Problems with blood vessels, nerves, or tissues of the penis can interfere with an erection.
Long-term predictions based on an aging population and an increase in risk factors (eg, hypertension, diabetes, vascular disease, pelvic and prostate surgery, benign prostatic hyperplasia, and lower urinary tract symptoms) suggest a large increase in the number of men with ED. In addition, the prevalence of ED is underestimated because physicians frequently do not question their patients about this disorder.
Physical examination should include the assessment of male secondary sex characteristics, femoral and lower extremity pulses, and a focused neurologic examination including perianal sensation, anal sphincter tone, and bulbocavernosus reflex. More extensive neurologic tests, including dorsal nerve conduction latencies, evoked potential measurements, and corpora cavernosal electromyography lack normative (control) data and appear at this time to be of limited clinical value. Examination of the genitalia includes evaluation of testis size and consistency, palpation of the shaft of the penis to determine the presence of Peyronie's plaques, and a digital rectal examination of the prostate with assessment of anal sphincter tone.
Having erection trouble from time to time isn't necessarily a cause for concern. If erectile dysfunction is an ongoing issue, however, it can cause stress, affect your self-confidence and contribute to relationship problems. Problems getting or keeping an erection can also be a sign of an underlying health condition that needs treatment and a risk factor for heart disease.